Struct gvariant::NonFixedWidthArray
source · [−]Expand description
Type with same representation as GVariant “aX” type where X is any non-fixed size type
This is similar to a slice
, but for non-fixed width types,
and implements many of the same methods. Items can be retrieved by indexing
or iterated over.
For fixed-width types a standard rust slice is used.
Implementations
sourceimpl<T: Cast + ?Sized> NonFixedWidthArray<T>
impl<T: Cast + ?Sized> NonFixedWidthArray<T>
sourcepub fn iter(&self) -> NonFixedWidthArrayIterator<'_, T>ⓘNotable traits for NonFixedWidthArrayIterator<'a, Item>impl<'a, Item: Cast + 'static + ?Sized> Iterator for NonFixedWidthArrayIterator<'a, Item> type Item = &'a Item;
pub fn iter(&self) -> NonFixedWidthArrayIterator<'_, T>ⓘNotable traits for NonFixedWidthArrayIterator<'a, Item>impl<'a, Item: Cast + 'static + ?Sized> Iterator for NonFixedWidthArrayIterator<'a, Item> type Item = &'a Item;
Returns an iterator over the array.
Trait Implementations
sourceimpl<T: Cast + ?Sized> AlignOf for NonFixedWidthArray<T>
impl<T: Cast + ?Sized> AlignOf for NonFixedWidthArray<T>
sourceimpl<T: Cast + ?Sized> Cast for NonFixedWidthArray<T>
impl<T: Cast + ?Sized> Cast for NonFixedWidthArray<T>
sourcefn default_ref() -> &'static Self
fn default_ref() -> &'static Self
Get a static reference to the default value for this type. Read more
fn try_from_aligned_slice(
slice: &AlignedSlice<Self::AlignOf>
) -> Result<&Self, WrongSize>
fn try_from_aligned_slice_mut(
slice: &mut AlignedSlice<Self::AlignOf>
) -> Result<&mut Self, WrongSize>
sourcefn from_aligned_slice(slice: &AlignedSlice<Self::AlignOf>) -> &Self
fn from_aligned_slice(slice: &AlignedSlice<Self::AlignOf>) -> &Self
Cast slice
to type Self
. Read more
sourceimpl<'a, Item: Cast + 'static + ?Sized> IntoIterator for &'a NonFixedWidthArray<Item>
impl<'a, Item: Cast + 'static + ?Sized> IntoIterator for &'a NonFixedWidthArray<Item>
sourceimpl<Item: Cast + ?Sized + PartialEq<T>, T: ?Sized> PartialEq<[&'_ T]> for NonFixedWidthArray<Item>
impl<Item: Cast + ?Sized + PartialEq<T>, T: ?Sized> PartialEq<[&'_ T]> for NonFixedWidthArray<Item>
sourceimpl<Item: Cast + ?Sized + PartialEq<T>, T: ?Sized> PartialEq<NonFixedWidthArray<Item>> for [&T]
impl<Item: Cast + ?Sized + PartialEq<T>, T: ?Sized> PartialEq<NonFixedWidthArray<Item>> for [&T]
sourceimpl<T: Cast + PartialEq + ?Sized> PartialEq<NonFixedWidthArray<T>> for NonFixedWidthArray<T>
impl<T: Cast + PartialEq + ?Sized> PartialEq<NonFixedWidthArray<T>> for NonFixedWidthArray<T>
sourceimpl<T: Cast + ?Sized> RefCast for NonFixedWidthArray<T>
impl<T: Cast + ?Sized> RefCast for NonFixedWidthArray<T>
sourceimpl<T: Cast + ?Sized> ToOwned for NonFixedWidthArray<T>
impl<T: Cast + ?Sized> ToOwned for NonFixedWidthArray<T>
type Owned = Owned<NonFixedWidthArray<T>>
type Owned = Owned<NonFixedWidthArray<T>>
The resulting type after obtaining ownership.
sourcefn to_owned(&self) -> Self::Owned
fn to_owned(&self) -> Self::Owned
Creates owned data from borrowed data, usually by cloning. Read more
sourcefn clone_into(&self, target: &mut Self::Owned)
fn clone_into(&self, target: &mut Self::Owned)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more
impl<T: Cast + ?Sized> AllBitPatternsValid for NonFixedWidthArray<T>
impl<T: Cast + PartialEq + Eq + ?Sized> Eq for NonFixedWidthArray<T>
Auto Trait Implementations
impl<T: ?Sized> RefUnwindSafe for NonFixedWidthArray<T> where
<T as AlignOf>::AlignOf: RefUnwindSafe,
impl<T: ?Sized> Send for NonFixedWidthArray<T> where
<T as AlignOf>::AlignOf: Send,
impl<T> !Sized for NonFixedWidthArray<T>
impl<T: ?Sized> Sync for NonFixedWidthArray<T> where
<T as AlignOf>::AlignOf: Sync,
impl<T: ?Sized> Unpin for NonFixedWidthArray<T> where
<T as AlignOf>::AlignOf: Unpin,
impl<T: ?Sized> UnwindSafe for NonFixedWidthArray<T> where
<T as AlignOf>::AlignOf: 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