Struct Variant
pub struct Variant { /* private fields */ }Expand description
A generic immutable value capable of carrying various types.
See the module documentation for more details.
GLib type: Shared boxed type with reference counted clone semantics.
Implementations§
§impl Variant
impl Variant
pub fn is<T>(&self) -> boolwhere
T: StaticVariantType,
pub fn is<T>(&self) -> boolwhere
T: StaticVariantType,
Returns true if the type of the value corresponds to T.
pub fn is_type(&self, type_: &VariantTy) -> bool
pub fn is_type(&self, type_: &VariantTy) -> bool
Returns true if the type of the value corresponds to type_.
This is equivalent to self.type_().is_subtype_of(type_).
pub fn classify(&self) -> VariantClass
pub fn classify(&self) -> VariantClass
Returns the classification of the variant.
pub fn get<T>(&self) -> Option<T>where
T: FromVariant,
pub fn get<T>(&self) -> Option<T>where
T: FromVariant,
Tries to extract a value of type T.
Returns Some if T matches the variant’s type.
pub fn try_get<T>(&self) -> Result<T, VariantTypeMismatchError>where
T: FromVariant,
pub fn try_get<T>(&self) -> Result<T, VariantTypeMismatchError>where
T: FromVariant,
Tries to extract a value of type T.
pub fn from_variant(value: &Variant) -> Variant
pub fn from_variant(value: &Variant) -> Variant
Boxes value.
pub fn as_variant(&self) -> Option<Variant>
pub fn as_variant(&self) -> Option<Variant>
Unboxes self.
Returns Some if self contains a Variant.
pub fn child_value(&self, index: usize) -> Variant
pub fn child_value(&self, index: usize) -> Variant
Reads a child item out of a container Variant instance.
§Panics
- if
selfis not a container type. - if given
indexis larger than number of children.
pub fn try_child_value(&self, index: usize) -> Option<Variant>
pub fn try_child_value(&self, index: usize) -> Option<Variant>
Try to read a child item out of a container Variant instance.
It returns None if self is not a container type or if the given
index is larger than number of children.
pub fn try_child_get<T>(
&self,
index: usize,
) -> Result<Option<T>, VariantTypeMismatchError>where
T: StaticVariantType + FromVariant,
pub fn try_child_get<T>(
&self,
index: usize,
) -> Result<Option<T>, VariantTypeMismatchError>where
T: StaticVariantType + FromVariant,
Try to read a child item out of a container Variant instance.
It returns Ok(None) if self is not a container type or if the given
index is larger than number of children. An error is thrown if the
type does not match.
pub fn child_get<T>(&self, index: usize) -> Twhere
T: StaticVariantType + FromVariant,
pub fn child_get<T>(&self, index: usize) -> Twhere
T: StaticVariantType + FromVariant,
Read a child item out of a container Variant instance.
§Panics
- if
selfis not a container type. - if given
indexis larger than number of children. - if the expected variant type does not match
pub fn str(&self) -> Option<&str>
pub fn str(&self) -> Option<&str>
Tries to extract a &str.
Returns Some if the variant has a string type (s, o or g type
strings).
pub fn fixed_array<T>(&self) -> Result<&[T], VariantTypeMismatchError>where
T: FixedSizeVariantType,
pub fn fixed_array<T>(&self) -> Result<&[T], VariantTypeMismatchError>where
T: FixedSizeVariantType,
Tries to extract a &[T] from a variant of array type with a suitable element type.
Returns an error if the type is wrong.
pub fn array_from_iter<T>(
children: impl IntoIterator<Item = Variant>,
) -> Variantwhere
T: StaticVariantType,
pub fn array_from_iter<T>(
children: impl IntoIterator<Item = Variant>,
) -> Variantwhere
T: StaticVariantType,
Creates a new Variant array from children.
§Panics
This function panics if not all variants are of type T.
pub fn array_from_iter_with_type(
type_: &VariantTy,
children: impl IntoIterator<Item = impl AsRef<Variant>>,
) -> Variant
pub fn array_from_iter_with_type( type_: &VariantTy, children: impl IntoIterator<Item = impl AsRef<Variant>>, ) -> Variant
Creates a new Variant array from children with the specified type.
§Panics
This function panics if not all variants are of type type_.
pub fn array_from_fixed_array<T>(array: &[T]) -> Variantwhere
T: FixedSizeVariantType,
pub fn array_from_fixed_array<T>(array: &[T]) -> Variantwhere
T: FixedSizeVariantType,
Creates a new Variant array from a fixed array.
pub fn tuple_from_iter(
children: impl IntoIterator<Item = impl AsRef<Variant>>,
) -> Variant
pub fn tuple_from_iter( children: impl IntoIterator<Item = impl AsRef<Variant>>, ) -> Variant
Creates a new Variant tuple from children.
pub fn from_dict_entry(key: &Variant, value: &Variant) -> Variant
pub fn from_dict_entry(key: &Variant, value: &Variant) -> Variant
Creates a new dictionary entry Variant.
DictEntry should be preferred over this when the types are known statically.
pub fn from_maybe<T>(child: Option<&Variant>) -> Variantwhere
T: StaticVariantType,
pub fn from_maybe<T>(child: Option<&Variant>) -> Variantwhere
T: StaticVariantType,
Creates a new maybe Variant.
pub fn as_maybe(&self) -> Option<Variant>
pub fn as_maybe(&self) -> Option<Variant>
Extract the value of a maybe Variant.
Returns the child value, or None if the value is Nothing.
§Panics
Panics if the variant is not maybe-typed.
pub fn print(&self, type_annotate: bool) -> GString
pub fn print(&self, type_annotate: bool) -> GString
Pretty-print the contents of this variant in a human-readable form.
A variant can be recreated from this output via Variant::parse.
pub fn parse(type_: Option<&VariantTy>, text: &str) -> Result<Variant, Error>
pub fn parse(type_: Option<&VariantTy>, text: &str) -> Result<Variant, Error>
Parses a GVariant from the text representation produced by print().
pub fn from_bytes<T>(bytes: &Bytes) -> Variantwhere
T: StaticVariantType,
pub fn from_bytes<T>(bytes: &Bytes) -> Variantwhere
T: StaticVariantType,
Constructs a new serialized-mode GVariant instance.
pub unsafe fn from_bytes_trusted<T>(bytes: &Bytes) -> Variantwhere
T: StaticVariantType,
pub unsafe fn from_bytes_trusted<T>(bytes: &Bytes) -> Variantwhere
T: StaticVariantType,
Constructs a new serialized-mode GVariant instance.
This is the same as from_bytes, except that checks on the passed
data are skipped.
You should not use this function on data from external sources.
§Safety
Since the data is not validated, this is potentially dangerous if called on bytes which are not guaranteed to have come from serialising another Variant. The caller is responsible for ensuring bad data is not passed in.
pub unsafe fn from_data_trusted<T, A>(data: A) -> Variant
pub unsafe fn from_data_trusted<T, A>(data: A) -> Variant
Constructs a new serialized-mode GVariant instance.
This is the same as from_data, except that checks on the passed
data are skipped.
You should not use this function on data from external sources.
§Safety
Since the data is not validated, this is potentially dangerous if called on bytes which are not guaranteed to have come from serialising another Variant. The caller is responsible for ensuring bad data is not passed in.
pub fn from_bytes_with_type(bytes: &Bytes, type_: &VariantTy) -> Variant
pub fn from_bytes_with_type(bytes: &Bytes, type_: &VariantTy) -> Variant
Constructs a new serialized-mode GVariant instance with a given type.
pub unsafe fn from_bytes_with_type_trusted(
bytes: &Bytes,
type_: &VariantTy,
) -> Variant
pub unsafe fn from_bytes_with_type_trusted( bytes: &Bytes, type_: &VariantTy, ) -> Variant
Constructs a new serialized-mode GVariant instance with a given type.
This is the same as from_bytes, except that checks on the passed
data are skipped.
You should not use this function on data from external sources.
§Safety
Since the data is not validated, this is potentially dangerous if called on bytes which are not guaranteed to have come from serialising another Variant. The caller is responsible for ensuring bad data is not passed in.
pub fn from_data_with_type<A>(data: A, type_: &VariantTy) -> Variant
pub fn from_data_with_type<A>(data: A, type_: &VariantTy) -> Variant
Constructs a new serialized-mode GVariant instance with a given type.
pub unsafe fn from_data_with_type_trusted<A>(
data: A,
type_: &VariantTy,
) -> Variant
pub unsafe fn from_data_with_type_trusted<A>( data: A, type_: &VariantTy, ) -> Variant
Constructs a new serialized-mode GVariant instance with a given type.
This is the same as from_data, except that checks on the passed
data are skipped.
You should not use this function on data from external sources.
§Safety
Since the data is not validated, this is potentially dangerous if called on bytes which are not guaranteed to have come from serialising another Variant. The caller is responsible for ensuring bad data is not passed in.
pub fn data_as_bytes(&self) -> Bytes
pub fn data_as_bytes(&self) -> Bytes
Returns the serialized form of a GVariant instance.
pub fn store(&self, data: &mut [u8]) -> Result<usize, BoolError>
pub fn store(&self, data: &mut [u8]) -> Result<usize, BoolError>
Stores the serialized form of a GVariant instance into the given slice.
The slice needs to be big enough.
pub fn normal_form(&self) -> Variant
pub fn normal_form(&self) -> Variant
Returns a copy of the variant in normal form.
pub fn n_children(&self) -> usize
pub fn n_children(&self) -> usize
Determines the number of children in a container GVariant instance.
pub fn iter(&self) -> VariantIter ⓘ
pub fn iter(&self) -> VariantIter ⓘ
Create an iterator over items in the variant.
Note that this heap allocates a variant for each element, which can be particularly expensive for large arrays.
pub fn array_iter_str(
&self,
) -> Result<VariantStrIter<'_>, VariantTypeMismatchError>
pub fn array_iter_str( &self, ) -> Result<VariantStrIter<'_>, VariantTypeMismatchError>
Create an iterator over borrowed strings from a GVariant of type as (array of string).
This will fail if the variant is not an array of with the expected child type.
A benefit of this API over Self::iter() is that it
minimizes allocation, and provides strongly typed access.
let strs = &["foo", "bar"];
let strs_variant: glib::Variant = strs.to_variant();
for s in strs_variant.array_iter_str()? {
println!("{}", s);
}pub fn is_container(&self) -> bool
pub fn is_container(&self) -> bool
Return whether this Variant is a container type.
pub fn is_normal_form(&self) -> bool
pub fn is_normal_form(&self) -> bool
Return whether this Variant is in normal form.
pub fn is_object_path(string: &str) -> bool
pub fn is_object_path(string: &str) -> bool
Return whether input string is a valid VariantClass::ObjectPath.
pub fn is_signature(string: &str) -> bool
pub fn is_signature(string: &str) -> bool
Return whether input string is a valid VariantClass::Signature.
Trait Implementations§
§impl<T0, T1, T2> From<(T0, T1, T2)> for Variant
impl<T0, T1, T2> From<(T0, T1, T2)> for Variant
§fn from(t: (T0, T1, T2)) -> Variant
fn from(t: (T0, T1, T2)) -> Variant
§impl<T0, T1, T2, T3> From<(T0, T1, T2, T3)> for Variant
impl<T0, T1, T2, T3> From<(T0, T1, T2, T3)> for Variant
§fn from(t: (T0, T1, T2, T3)) -> Variant
fn from(t: (T0, T1, T2, T3)) -> Variant
§impl<T0, T1, T2, T3, T4> From<(T0, T1, T2, T3, T4)> for Variant
impl<T0, T1, T2, T3, T4> From<(T0, T1, T2, T3, T4)> for Variant
§fn from(t: (T0, T1, T2, T3, T4)) -> Variant
fn from(t: (T0, T1, T2, T3, T4)) -> Variant
§impl<T0, T1, T2, T3, T4, T5> From<(T0, T1, T2, T3, T4, T5)> for Variant
impl<T0, T1, T2, T3, T4, T5> From<(T0, T1, T2, T3, T4, T5)> for Variant
§fn from(t: (T0, T1, T2, T3, T4, T5)) -> Variant
fn from(t: (T0, T1, T2, T3, T4, T5)) -> Variant
§impl<T0, T1, T2, T3, T4, T5, T6> From<(T0, T1, T2, T3, T4, T5, T6)> for Variant
impl<T0, T1, T2, T3, T4, T5, T6> From<(T0, T1, T2, T3, T4, T5, T6)> for Variant
§fn from(t: (T0, T1, T2, T3, T4, T5, T6)) -> Variant
fn from(t: (T0, T1, T2, T3, T4, T5, T6)) -> Variant
§impl<T0, T1, T2, T3, T4, T5, T6, T7> From<(T0, T1, T2, T3, T4, T5, T6, T7)> for Variant
impl<T0, T1, T2, T3, T4, T5, T6, T7> From<(T0, T1, T2, T3, T4, T5, T6, T7)> for Variant
§fn from(t: (T0, T1, T2, T3, T4, T5, T6, T7)) -> Variant
fn from(t: (T0, T1, T2, T3, T4, T5, T6, T7)) -> Variant
§impl<T0, T1, T2, T3, T4, T5, T6, T7, T8> From<(T0, T1, T2, T3, T4, T5, T6, T7, T8)> for Variant
impl<T0, T1, T2, T3, T4, T5, T6, T7, T8> From<(T0, T1, T2, T3, T4, T5, T6, T7, T8)> for Variant
§fn from(t: (T0, T1, T2, T3, T4, T5, T6, T7, T8)) -> Variant
fn from(t: (T0, T1, T2, T3, T4, T5, T6, T7, T8)) -> Variant
§impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9> From<(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9)> for Variant
impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9> From<(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9)> for Variant
§fn from(t: (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9)) -> Variant
fn from(t: (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9)) -> Variant
§impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> From<(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)> for Variant
impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> From<(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)> for Variant
§fn from(t: (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)) -> Variant
fn from(t: (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)) -> Variant
§impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> From<(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11)> for Variant
impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> From<(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11)> for Variant
§fn from(t: (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11)) -> Variant
fn from(t: (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11)) -> Variant
§impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> From<(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12)> for Variant
impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> From<(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12)> for Variant
§fn from(t: (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12)) -> Variant
fn from(t: (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12)) -> Variant
§impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13> From<(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13)> for Variant
impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13> From<(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13)> for Variant
§fn from(
t: (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13),
) -> Variant
fn from( t: (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13), ) -> Variant
§impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14> From<(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14)> for Variant
impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14> From<(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14)> for Variant
§fn from(
t: (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14),
) -> Variant
fn from( t: (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14), ) -> Variant
§impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> From<(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15)> for Variantwhere
T0: Into<Variant>,
T1: Into<Variant>,
T2: Into<Variant>,
T3: Into<Variant>,
T4: Into<Variant>,
T5: Into<Variant>,
T6: Into<Variant>,
T7: Into<Variant>,
T8: Into<Variant>,
T9: Into<Variant>,
T10: Into<Variant>,
T11: Into<Variant>,
T12: Into<Variant>,
T13: Into<Variant>,
T14: Into<Variant>,
T15: Into<Variant>,
impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> From<(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15)> for Variantwhere
T0: Into<Variant>,
T1: Into<Variant>,
T2: Into<Variant>,
T3: Into<Variant>,
T4: Into<Variant>,
T5: Into<Variant>,
T6: Into<Variant>,
T7: Into<Variant>,
T8: Into<Variant>,
T9: Into<Variant>,
T10: Into<Variant>,
T11: Into<Variant>,
T12: Into<Variant>,
T13: Into<Variant>,
T14: Into<Variant>,
T15: Into<Variant>,
§fn from(
t: (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15),
) -> Variant
fn from( t: (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15), ) -> Variant
§impl<A, T> From<FixedSizeVariantArray<A, T>> for Variant
impl<A, T> From<FixedSizeVariantArray<A, T>> for Variant
§fn from(a: FixedSizeVariantArray<A, T>) -> Variant
fn from(a: FixedSizeVariantArray<A, T>) -> Variant
§impl From<ObjectPath> for Variant
impl From<ObjectPath> for Variant
§fn from(p: ObjectPath) -> Variant
fn from(p: ObjectPath) -> Variant
§impl From<Variant> for VariantDict
impl From<Variant> for VariantDict
§fn from(other: Variant) -> VariantDict
fn from(other: Variant) -> VariantDict
§impl From<VariantDict> for Variant
impl From<VariantDict> for Variant
§fn from(d: VariantDict) -> Variant
fn from(d: VariantDict) -> Variant
Consume a given VariantDict and call VariantDict::end on it.
Note: While this method consumes the VariantDict, the underlying
object could still be accessed through other clones because of the
reference counted clone semantics.
§impl<T> FromIterator<T> for Variant
impl<T> FromIterator<T> for Variant
§fn from_iter<I>(iter: I) -> Variantwhere
I: IntoIterator<Item = T>,
fn from_iter<I>(iter: I) -> Variantwhere
I: IntoIterator<Item = T>,
§impl FromVariant for Variant
impl FromVariant for Variant
§impl HasParamSpec for Variant
impl HasParamSpec for Variant
type ParamSpec = ParamSpecVariant
type BuilderFn = for<'a> fn(&'a str, &'a VariantTy) -> ParamSpecVariantBuilder<'a>
fn param_spec_builder() -> <Variant as HasParamSpec>::BuilderFn
§impl PartialOrd for Variant
impl PartialOrd for Variant
§impl StaticType for Variant
impl StaticType for Variant
§fn static_type() -> Type
fn static_type() -> Type
Self.§impl StaticVariantType for Variant
impl StaticVariantType for Variant
§fn static_variant_type() -> Cow<'static, VariantTy>
fn static_variant_type() -> Cow<'static, VariantTy>
VariantType corresponding to Self.impl Eq for Variant
impl Send for Variant
impl Sync for Variant
Auto Trait Implementations§
impl Freeze for Variant
impl RefUnwindSafe for Variant
impl Unpin for Variant
impl UnwindSafe for Variant
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
§impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
§impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
§impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
§impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
§impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
§impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
unsafe fn from_glib_none_as_vec(ptr: *const GList) -> Vec<T>
unsafe fn from_glib_container_as_vec(_: *const GList) -> Vec<T>
unsafe fn from_glib_full_as_vec(_: *const GList) -> Vec<T>
§impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
unsafe fn from_glib_none_as_vec(ptr: *const GPtrArray) -> Vec<T>
unsafe fn from_glib_container_as_vec(_: *const GPtrArray) -> Vec<T>
unsafe fn from_glib_full_as_vec(_: *const GPtrArray) -> Vec<T>
§impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
unsafe fn from_glib_none_as_vec(ptr: *const GSList) -> Vec<T>
unsafe fn from_glib_container_as_vec(_: *const GSList) -> Vec<T>
unsafe fn from_glib_full_as_vec(_: *const GSList) -> Vec<T>
§impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
unsafe fn from_glib_none_as_vec(ptr: *mut GList) -> Vec<T>
unsafe fn from_glib_container_as_vec(ptr: *mut GList) -> Vec<T>
unsafe fn from_glib_full_as_vec(ptr: *mut GList) -> Vec<T>
§impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
unsafe fn from_glib_none_as_vec(ptr: *mut GPtrArray) -> Vec<T>
unsafe fn from_glib_container_as_vec(ptr: *mut GPtrArray) -> Vec<T>
unsafe fn from_glib_full_as_vec(ptr: *mut GPtrArray) -> Vec<T>
§impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
unsafe fn from_glib_none_as_vec(ptr: *mut GSList) -> Vec<T>
unsafe fn from_glib_container_as_vec(ptr: *mut GSList) -> Vec<T>
unsafe fn from_glib_full_as_vec(ptr: *mut GSList) -> Vec<T>
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
§impl<T> IntoClosureReturnValue for T
impl<T> IntoClosureReturnValue for T
fn into_closure_return_value(self) -> Option<Value>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§impl<T> Property for Twhere
T: HasParamSpec,
impl<T> Property for Twhere
T: HasParamSpec,
§impl<T> PropertyGet for Twhere
T: HasParamSpec,
impl<T> PropertyGet for Twhere
T: HasParamSpec,
§impl<T> StaticTypeExt for Twhere
T: StaticType,
impl<T> StaticTypeExt for Twhere
T: StaticType,
§fn ensure_type()
fn ensure_type()
§impl<T> ToSendValue for T
impl<T> ToSendValue for T
§fn to_send_value(&self) -> SendValue
fn to_send_value(&self) -> SendValue
SendValue clone of self.§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.