Struct glib::variant::FixedSizeVariantArray
source · [−]pub struct FixedSizeVariantArray<A, T>(_, _)
where
A: AsRef<[T]>,
T: FixedSizeVariantType;
Expand description
Wrapper type for fixed size type arrays.
Converting this from/to a Variant
is generally more efficient than working on the type
directly. This is especially important when deriving Variant
trait implementations on custom
types.
This wrapper type can hold for example Vec<u8>
, Box<[u8]>
and similar types.
Implementations
sourceimpl<A: AsRef<[T]>, T: FixedSizeVariantType> FixedSizeVariantArray<A, T>
impl<A: AsRef<[T]>, T: FixedSizeVariantType> FixedSizeVariantArray<A, T>
pub fn into_inner(self) -> A
Trait Implementations
sourceimpl<A: AsRef<[T]> + AsMut<[T]>, T: FixedSizeVariantType> AsMut<[T]> for FixedSizeVariantArray<A, T>
impl<A: AsRef<[T]> + AsMut<[T]>, T: FixedSizeVariantType> AsMut<[T]> for FixedSizeVariantArray<A, T>
sourceimpl<A: AsRef<[T]>, T: FixedSizeVariantType> AsMut<A> for FixedSizeVariantArray<A, T>
impl<A: AsRef<[T]>, T: FixedSizeVariantType> AsMut<A> for FixedSizeVariantArray<A, T>
sourceimpl<A: AsRef<[T]>, T: FixedSizeVariantType> AsRef<[T]> for FixedSizeVariantArray<A, T>
impl<A: AsRef<[T]>, T: FixedSizeVariantType> AsRef<[T]> for FixedSizeVariantArray<A, T>
sourceimpl<A: AsRef<[T]>, T: FixedSizeVariantType> AsRef<A> for FixedSizeVariantArray<A, T>
impl<A: AsRef<[T]>, T: FixedSizeVariantType> AsRef<A> for FixedSizeVariantArray<A, T>
sourceimpl<A: Clone, T: Clone> Clone for FixedSizeVariantArray<A, T> where
A: AsRef<[T]>,
T: FixedSizeVariantType,
impl<A: Clone, T: Clone> Clone for FixedSizeVariantArray<A, T> where
A: AsRef<[T]>,
T: FixedSizeVariantType,
sourcefn clone(&self) -> FixedSizeVariantArray<A, T>
fn clone(&self) -> FixedSizeVariantArray<A, T>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl<A: Debug, T: Debug> Debug for FixedSizeVariantArray<A, T> where
A: AsRef<[T]>,
T: FixedSizeVariantType,
impl<A: Debug, T: Debug> Debug for FixedSizeVariantArray<A, T> where
A: AsRef<[T]>,
T: FixedSizeVariantType,
sourceimpl<A: AsRef<[T]>, T: FixedSizeVariantType> Deref for FixedSizeVariantArray<A, T>
impl<A: AsRef<[T]>, T: FixedSizeVariantType> Deref for FixedSizeVariantArray<A, T>
sourceimpl<A: AsRef<[T]>, T: FixedSizeVariantType> DerefMut for FixedSizeVariantArray<A, T>
impl<A: AsRef<[T]>, T: FixedSizeVariantType> DerefMut for FixedSizeVariantArray<A, T>
sourceimpl<A: AsRef<[T]>, T: FixedSizeVariantType> From<A> for FixedSizeVariantArray<A, T>
impl<A: AsRef<[T]>, T: FixedSizeVariantType> From<A> for FixedSizeVariantArray<A, T>
sourceimpl<A: AsRef<[T]> + for<'a> From<&'a [T]>, T: FixedSizeVariantType> FromVariant for FixedSizeVariantArray<A, T>
impl<A: AsRef<[T]> + for<'a> From<&'a [T]>, T: FixedSizeVariantType> FromVariant for FixedSizeVariantArray<A, T>
sourcefn from_variant(variant: &Variant) -> Option<Self>
fn from_variant(variant: &Variant) -> Option<Self>
Tries to extract a value. Read more
sourceimpl<A: Hash, T: Hash> Hash for FixedSizeVariantArray<A, T> where
A: AsRef<[T]>,
T: FixedSizeVariantType,
impl<A: Hash, T: Hash> Hash for FixedSizeVariantArray<A, T> where
A: AsRef<[T]>,
T: FixedSizeVariantType,
sourceimpl<A: Ord, T: Ord> Ord for FixedSizeVariantArray<A, T> where
A: AsRef<[T]>,
T: FixedSizeVariantType,
impl<A: Ord, T: Ord> Ord for FixedSizeVariantArray<A, T> where
A: AsRef<[T]>,
T: FixedSizeVariantType,
sourceimpl<A: PartialEq, T: PartialEq> PartialEq<FixedSizeVariantArray<A, T>> for FixedSizeVariantArray<A, T> where
A: AsRef<[T]>,
T: FixedSizeVariantType,
impl<A: PartialEq, T: PartialEq> PartialEq<FixedSizeVariantArray<A, T>> for FixedSizeVariantArray<A, T> where
A: AsRef<[T]>,
T: FixedSizeVariantType,
sourcefn eq(&self, other: &FixedSizeVariantArray<A, T>) -> bool
fn eq(&self, other: &FixedSizeVariantArray<A, T>) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &FixedSizeVariantArray<A, T>) -> bool
fn ne(&self, other: &FixedSizeVariantArray<A, T>) -> bool
This method tests for !=
.
sourceimpl<A: PartialOrd, T: PartialOrd> PartialOrd<FixedSizeVariantArray<A, T>> for FixedSizeVariantArray<A, T> where
A: AsRef<[T]>,
T: FixedSizeVariantType,
impl<A: PartialOrd, T: PartialOrd> PartialOrd<FixedSizeVariantArray<A, T>> for FixedSizeVariantArray<A, T> where
A: AsRef<[T]>,
T: FixedSizeVariantType,
sourcefn partial_cmp(&self, other: &FixedSizeVariantArray<A, T>) -> Option<Ordering>
fn partial_cmp(&self, other: &FixedSizeVariantArray<A, T>) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
sourceimpl<A: AsRef<[T]>, T: FixedSizeVariantType> StaticVariantType for FixedSizeVariantArray<A, T>
impl<A: AsRef<[T]>, T: FixedSizeVariantType> StaticVariantType for FixedSizeVariantArray<A, T>
sourcefn static_variant_type() -> Cow<'static, VariantTy>
fn static_variant_type() -> Cow<'static, VariantTy>
Returns the VariantType
corresponding to Self
.
sourceimpl<A: AsRef<[T]>, T: FixedSizeVariantType> ToVariant for FixedSizeVariantArray<A, T>
impl<A: AsRef<[T]>, T: FixedSizeVariantType> ToVariant for FixedSizeVariantArray<A, T>
sourcefn to_variant(&self) -> Variant
fn to_variant(&self) -> Variant
Returns a Variant
clone of self
.
impl<A: Copy, T: Copy> Copy for FixedSizeVariantArray<A, T> where
A: AsRef<[T]>,
T: FixedSizeVariantType,
impl<A: Eq, T: Eq> Eq for FixedSizeVariantArray<A, T> where
A: AsRef<[T]>,
T: FixedSizeVariantType,
impl<A, T> StructuralEq for FixedSizeVariantArray<A, T> where
A: AsRef<[T]>,
T: FixedSizeVariantType,
impl<A, T> StructuralPartialEq for FixedSizeVariantArray<A, T> where
A: AsRef<[T]>,
T: FixedSizeVariantType,
Auto Trait Implementations
impl<A, T> RefUnwindSafe for FixedSizeVariantArray<A, T> where
A: RefUnwindSafe,
T: RefUnwindSafe,
impl<A, T> Send for FixedSizeVariantArray<A, T> where
A: Send,
T: Send,
impl<A, T> Sync for FixedSizeVariantArray<A, T> where
A: Sync,
T: Sync,
impl<A, T> Unpin for FixedSizeVariantArray<A, T> where
A: Unpin,
T: Unpin,
impl<A, T> UnwindSafe for FixedSizeVariantArray<A, T> where
A: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more