Struct FixedSizeVariantArray
pub struct FixedSizeVariantArray<A, T>(/* private fields */)
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§
§impl<A, T> FixedSizeVariantArray<A, T>
impl<A, T> FixedSizeVariantArray<A, T>
pub fn into_inner(self) -> A
Trait Implementations§
§impl<A, T> AsMut<[T]> for FixedSizeVariantArray<A, T>
impl<A, T> AsMut<[T]> for FixedSizeVariantArray<A, T>
§impl<A, T> AsMut<A> for FixedSizeVariantArray<A, T>
impl<A, T> AsMut<A> for FixedSizeVariantArray<A, T>
§impl<A, T> AsRef<[T]> for FixedSizeVariantArray<A, T>
impl<A, T> AsRef<[T]> for FixedSizeVariantArray<A, T>
§impl<A, T> AsRef<A> for FixedSizeVariantArray<A, T>
impl<A, T> AsRef<A> for FixedSizeVariantArray<A, T>
§impl<A, T> Clone for FixedSizeVariantArray<A, T>
impl<A, T> Clone for FixedSizeVariantArray<A, T>
§fn clone(&self) -> FixedSizeVariantArray<A, T>
fn clone(&self) -> FixedSizeVariantArray<A, T>
Returns a duplicate 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 more§impl<A, T> Debug for FixedSizeVariantArray<A, T>
impl<A, T> Debug for FixedSizeVariantArray<A, T>
§impl<A, T> Deref for FixedSizeVariantArray<A, T>
impl<A, T> Deref for FixedSizeVariantArray<A, T>
§impl<A, T> DerefMut for FixedSizeVariantArray<A, T>
impl<A, T> DerefMut for FixedSizeVariantArray<A, T>
§fn deref_mut(&mut self) -> &mut <FixedSizeVariantArray<A, T> as Deref>::Target
fn deref_mut(&mut self) -> &mut <FixedSizeVariantArray<A, T> as Deref>::Target
Mutably dereferences the value.
§impl<A, T> From<A> for FixedSizeVariantArray<A, T>
impl<A, T> From<A> for FixedSizeVariantArray<A, T>
§fn from(array: A) -> FixedSizeVariantArray<A, T>
fn from(array: A) -> FixedSizeVariantArray<A, T>
Converts to this type from the input type.
§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
Converts to this type from the input type.
§impl<A, T> FromVariant for FixedSizeVariantArray<A, T>
impl<A, T> FromVariant for FixedSizeVariantArray<A, T>
§fn from_variant(variant: &Variant) -> Option<FixedSizeVariantArray<A, T>>
fn from_variant(variant: &Variant) -> Option<FixedSizeVariantArray<A, T>>
Tries to extract a value. Read more
§impl<A, T> Hash for FixedSizeVariantArray<A, T>
impl<A, T> Hash for FixedSizeVariantArray<A, T>
§impl<A, T> Ord for FixedSizeVariantArray<A, T>
impl<A, T> Ord for FixedSizeVariantArray<A, T>
§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
§impl<A, T> PartialEq for FixedSizeVariantArray<A, T>
impl<A, T> PartialEq for FixedSizeVariantArray<A, T>
§impl<A, T> PartialOrd for FixedSizeVariantArray<A, T>
impl<A, T> PartialOrd for FixedSizeVariantArray<A, T>
§impl<A, T> StaticVariantType for FixedSizeVariantArray<A, T>
impl<A, T> StaticVariantType for FixedSizeVariantArray<A, T>
§fn static_variant_type() -> Cow<'static, VariantTy>
fn static_variant_type() -> Cow<'static, VariantTy>
Returns the
VariantType corresponding to Self.§impl<A, T> ToVariant for FixedSizeVariantArray<A, T>
impl<A, T> ToVariant for FixedSizeVariantArray<A, T>
§fn to_variant(&self) -> Variant
fn to_variant(&self) -> Variant
Returns a
Variant clone of self.impl<A, T> Copy for FixedSizeVariantArray<A, T>
impl<A, T> Eq for FixedSizeVariantArray<A, T>
impl<A, T> StructuralPartialEq for FixedSizeVariantArray<A, T>
Auto Trait Implementations§
impl<A, T> Freeze for FixedSizeVariantArray<A, T>where
A: Freeze,
impl<A, T> RefUnwindSafe for FixedSizeVariantArray<A, T>where
A: RefUnwindSafe,
T: RefUnwindSafe,
impl<A, T> Send for FixedSizeVariantArray<A, T>
impl<A, T> Sync for FixedSizeVariantArray<A, T>
impl<A, T> Unpin for FixedSizeVariantArray<A, T>
impl<A, T> UnwindSafe for FixedSizeVariantArray<A, T>where
A: UnwindSafe,
T: UnwindSafe,
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§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
Checks if this value is equivalent to the given key. Read more
§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
Compare self to
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
Checks if this value is equivalent to the given key. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
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> ⓘ
Converts
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> ⓘ
Converts
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,
Source§impl<T> ToHex for T
impl<T> ToHex for T
Source§fn encode_hex<U>(&self) -> Uwhere
U: FromIterator<char>,
fn encode_hex<U>(&self) -> Uwhere
U: FromIterator<char>,
Encode the hex strict representing
self into the result. Lower case
letters are used (e.g. f9b4ca)Source§fn encode_hex_upper<U>(&self) -> Uwhere
U: FromIterator<char>,
fn encode_hex_upper<U>(&self) -> Uwhere
U: FromIterator<char>,
Encode the hex strict representing
self into the result. Upper case
letters are used (e.g. F9B4CA)