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§
source§impl<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§
source§impl<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>
source§impl<A: AsRef<[T]>, T: FixedSizeVariantType> AsMut<A> for FixedSizeVariantArray<A, T>
impl<A: AsRef<[T]>, T: FixedSizeVariantType> AsMut<A> for FixedSizeVariantArray<A, T>
source§impl<A: AsRef<[T]>, T: FixedSizeVariantType> AsRef<[T]> for FixedSizeVariantArray<A, T>
impl<A: AsRef<[T]>, T: FixedSizeVariantType> AsRef<[T]> for FixedSizeVariantArray<A, T>
source§impl<A: AsRef<[T]>, T: FixedSizeVariantType> AsRef<A> for FixedSizeVariantArray<A, T>
impl<A: AsRef<[T]>, T: FixedSizeVariantType> AsRef<A> for FixedSizeVariantArray<A, T>
source§impl<A, T> Clone for FixedSizeVariantArray<A, T>where
A: AsRef<[T]> + Clone,
T: FixedSizeVariantType + Clone,
impl<A, T> Clone for FixedSizeVariantArray<A, T>where A: AsRef<[T]> + Clone, T: FixedSizeVariantType + Clone,
source§fn clone(&self) -> FixedSizeVariantArray<A, T>
fn clone(&self) -> FixedSizeVariantArray<A, T>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<A, T> Debug for FixedSizeVariantArray<A, T>where
A: AsRef<[T]> + Debug,
T: FixedSizeVariantType + Debug,
impl<A, T> Debug for FixedSizeVariantArray<A, T>where A: AsRef<[T]> + Debug, T: FixedSizeVariantType + Debug,
source§impl<A: AsRef<[T]>, T: FixedSizeVariantType> Deref for FixedSizeVariantArray<A, T>
impl<A: AsRef<[T]>, T: FixedSizeVariantType> Deref for FixedSizeVariantArray<A, T>
source§impl<A: AsRef<[T]>, T: FixedSizeVariantType> DerefMut for FixedSizeVariantArray<A, T>
impl<A: AsRef<[T]>, T: FixedSizeVariantType> DerefMut for FixedSizeVariantArray<A, T>
source§impl<A: AsRef<[T]>, T: FixedSizeVariantType> From<A> for FixedSizeVariantArray<A, T>
impl<A: AsRef<[T]>, T: FixedSizeVariantType> From<A> for FixedSizeVariantArray<A, T>
source§impl<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>
source§impl<A, T> Hash for FixedSizeVariantArray<A, T>where
A: AsRef<[T]> + Hash,
T: FixedSizeVariantType + Hash,
impl<A, T> Hash for FixedSizeVariantArray<A, T>where A: AsRef<[T]> + Hash, T: FixedSizeVariantType + Hash,
source§impl<A, T> Ord for FixedSizeVariantArray<A, T>where
A: AsRef<[T]> + Ord,
T: FixedSizeVariantType + Ord,
impl<A, T> Ord for FixedSizeVariantArray<A, T>where A: AsRef<[T]> + Ord, T: FixedSizeVariantType + Ord,
source§fn cmp(&self, other: &FixedSizeVariantArray<A, T>) -> Ordering
fn cmp(&self, other: &FixedSizeVariantArray<A, T>) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl<A, T> PartialEq<FixedSizeVariantArray<A, T>> for FixedSizeVariantArray<A, T>where
A: AsRef<[T]> + PartialEq,
T: FixedSizeVariantType + PartialEq,
impl<A, T> PartialEq<FixedSizeVariantArray<A, T>> for FixedSizeVariantArray<A, T>where A: AsRef<[T]> + PartialEq, T: FixedSizeVariantType + PartialEq,
source§fn 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 ==
.source§impl<A, T> PartialOrd<FixedSizeVariantArray<A, T>> for FixedSizeVariantArray<A, T>where
A: AsRef<[T]> + PartialOrd,
T: FixedSizeVariantType + PartialOrd,
impl<A, T> PartialOrd<FixedSizeVariantArray<A, T>> for FixedSizeVariantArray<A, T>where A: AsRef<[T]> + PartialOrd, T: FixedSizeVariantType + PartialOrd,
source§fn partial_cmp(&self, other: &FixedSizeVariantArray<A, T>) -> Option<Ordering>
fn partial_cmp(&self, other: &FixedSizeVariantArray<A, T>) -> Option<Ordering>
1.0.0 · source§fn 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 moresource§impl<A: AsRef<[T]>, T: FixedSizeVariantType> StaticVariantType for FixedSizeVariantArray<A, T>
impl<A: AsRef<[T]>, T: FixedSizeVariantType> StaticVariantType for FixedSizeVariantArray<A, T>
source§fn static_variant_type() -> Cow<'static, VariantTy>
fn static_variant_type() -> Cow<'static, VariantTy>
Returns the
VariantType
corresponding to Self
.source§impl<A: AsRef<[T]>, T: FixedSizeVariantType> ToVariant for FixedSizeVariantArray<A, T>
impl<A: AsRef<[T]>, T: FixedSizeVariantType> ToVariant for FixedSizeVariantArray<A, T>
source§fn to_variant(&self) -> Variant
fn to_variant(&self) -> Variant
Returns a
Variant
clone of self
.