[]Struct gio::SettingsSchemaKey

pub struct SettingsSchemaKey(_);

SettingsSchemaKey is an opaque data structure and can only be accessed using the following functions.

Implementations

impl SettingsSchemaKey[src]

pub fn get_default_value(&self) -> Option<Variant>[src]

Gets the default value for self.

Note that this is the default value according to the schema. System administrator defaults and lockdown are not visible via this API.

Returns

the default value for the key

pub fn get_description(&self) -> Option<GString>[src]

Gets the description for self.

If no description has been provided in the schema for self, returns None.

The description can be one sentence to several paragraphs in length. Paragraphs are delimited with a double newline. Descriptions can be translated and the value returned from this function is is the current locale.

This function is slow. The summary and description information for the schemas is not stored in the compiled schema database so this function has to parse all of the source XML files in the schema directory.

Returns

the description for self, or None

pub fn get_name(&self) -> Option<GString>[src]

Gets the name of self.

Feature: v2_44

Returns

the name of self.

pub fn get_range(&self) -> Option<Variant>[src]

Queries the range of a key.

This function will return a glib::Variant that fully describes the range of values that are valid for self.

The type of glib::Variant returned is (sv). The string describes the type of range restriction in effect. The type and meaning of the value contained in the variant depends on the string.

If the string is 'type' then the variant contains an empty array. The element type of that empty array is the expected type of value and all values of that type are valid.

If the string is 'enum' then the variant contains an array enumerating the possible values. Each item in the array is a possible valid value and no other values are valid.

If the string is 'flags' then the variant contains an array. Each item in the array is a value that may appear zero or one times in an array to be used as the value for this key. For example, if the variant contained the array ['x', 'y'] then the valid values for the key would be [], ['x'], ['y'], ['x', 'y'] and ['y', 'x'].

Finally, if the string is 'range' then the variant contains a pair of like-typed values -- the minimum and maximum permissible values for this key.

This information should not be used by normal programs. It is considered to be a hint for introspection purposes. Normal programs should already know what is permitted by their own schema. The format may change in any way in the future -- but particularly, new forms may be added to the possibilities described above.

You should free the returned value with glib::Variant::unref when it is no longer needed.

Returns

a glib::Variant describing the range

pub fn get_summary(&self) -> Option<GString>[src]

Gets the summary for self.

If no summary has been provided in the schema for self, returns None.

The summary is a short description of the purpose of the key; usually one short sentence. Summaries can be translated and the value returned from this function is is the current locale.

This function is slow. The summary and description information for the schemas is not stored in the compiled schema database so this function has to parse all of the source XML files in the schema directory.

Returns

the summary for self, or None

pub fn get_value_type(&self) -> Option<VariantType>[src]

Gets the glib::VariantType of self.

Returns

the type of self

pub fn range_check(&self, value: &Variant) -> bool[src]

Checks if the given value is of the correct type and within the permitted range for self.

It is a programmer error if value is not of the correct type -- you must check for this first.

value

the value to check

Returns

true if value is valid for self

Trait Implementations

impl Clone for SettingsSchemaKey

impl Debug for SettingsSchemaKey[src]

impl Eq for SettingsSchemaKey[src]

impl Hash for SettingsSchemaKey[src]

impl Ord for SettingsSchemaKey[src]

impl PartialEq<SettingsSchemaKey> for SettingsSchemaKey[src]

impl PartialOrd<SettingsSchemaKey> for SettingsSchemaKey[src]

impl StaticType for SettingsSchemaKey

impl StructuralEq for SettingsSchemaKey[src]

impl StructuralPartialEq for SettingsSchemaKey[src]

Auto Trait Implementations

impl RefUnwindSafe for SettingsSchemaKey

impl !Send for SettingsSchemaKey

impl !Sync for SettingsSchemaKey

impl Unpin for SettingsSchemaKey

impl UnwindSafe for SettingsSchemaKey

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<'a, T> ToGlibContainerFromSlice<'a, *const GList> for T where
    T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>, 

type Storage = (Option<List>, Vec<Stash<'a, <T as GlibPtrDefault>::GlibType, T>>)

impl<'a, T> ToGlibContainerFromSlice<'a, *const GPtrArray> for T where
    T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>, 

type Storage = (Option<PtrArray>, Vec<Stash<'a, <T as GlibPtrDefault>::GlibType, T>>)

impl<'a, T> ToGlibContainerFromSlice<'a, *mut GArray> for T where
    T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>, 

type Storage = (Option<Array>, Vec<Stash<'a, <T as GlibPtrDefault>::GlibType, T>>)

impl<'a, T> ToGlibContainerFromSlice<'a, *mut GList> for T where
    T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>, 

type Storage = (Option<List>, Vec<Stash<'a, <T as GlibPtrDefault>::GlibType, T>>)

impl<'a, T> ToGlibContainerFromSlice<'a, *mut GPtrArray> for T where
    T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>, 

type Storage = (Option<PtrArray>, Vec<Stash<'a, <T as GlibPtrDefault>::GlibType, T>>)

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToSendValue for T where
    T: ToValue + SetValue + Send + ?Sized

impl<T> ToValue for T where
    T: SetValue + ?Sized

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.