Skip to main content

SliceLabel

Struct SliceLabel 

Source
#[repr(transparent)]
pub struct SliceLabel<Word: AnyBitPattern>(pub [Word]);
Expand description

Implementation of StridableLabel that simply wraps a slice.

Tuple Fields§

§0: [Word]

Trait Implementations§

Source§

impl<Word: AnyBitPattern> AsMut<[Word]> for SliceLabel<Word>

Source§

fn as_mut(&mut self) -> &mut [Word]

Converts this type into a mutable reference of the (usually inferred) input type.
Source§

impl<Word: AnyBitPattern> AsRef<[Word]> for SliceLabel<Word>

Source§

fn as_ref(&self) -> &[Word]

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl<Word: AnyBitPattern> Borrow<SliceLabel<Word>> for BoxLabel<Word>

Source§

fn borrow(&self) -> &SliceLabel<Word>

Immutably borrows from an owned value. Read more
Source§

impl<Word: AnyBitPattern> BorrowMut<SliceLabel<Word>> for BoxLabel<Word>

Source§

fn borrow_mut(&mut self) -> &mut SliceLabel<Word>

Mutably borrows from an owned value. Read more
Source§

impl<Word: Debug + AnyBitPattern> Debug for SliceLabel<Word>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<Word: PartialEq + AnyBitPattern> PartialEq for SliceLabel<Word>

Source§

fn eq(&self, other: &SliceLabel<Word>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<Word: AnyBitPattern + Default> StridableLabel for SliceLabel<Word>

Source§

type Word = Word

Source§

fn from_stride(stride: &[Self::Word]) -> &Self

Source§

fn swap_with_stride(&mut self, stride: &mut [Self::Word])

Source§

impl<Word: AnyBitPattern> ToOwned for SliceLabel<Word>

Source§

type Owned = BoxLabel<Word>

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> Self::Owned

Creates owned data from borrowed data, usually by cloning. Read more
1.63.0 · Source§

fn clone_into(&self, target: &mut Self::Owned)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<Word: AnyBitPattern> TransparentWrapper<[Word]> for SliceLabel<Word>

Source§

fn wrap_ref(s: &Inner) -> &Self

Convert a reference to the inner type into a reference to the wrapper type.
Source§

fn wrap_mut(s: &mut Inner) -> &mut Self

Convert a mutable reference to the inner type into a mutable reference to the wrapper type.
Source§

fn peel_ref(s: &Self) -> &Inner

Convert a reference to the wrapper type into a reference to the inner type.
Source§

fn peel_mut(s: &mut Self) -> &mut Inner

Convert a mutable reference to the wrapper type into a mutable reference to the inner type.
Source§

impl<Word: Eq + AnyBitPattern> Eq for SliceLabel<Word>

Source§

impl<Word: AnyBitPattern> StructuralPartialEq for SliceLabel<Word>

Auto Trait Implementations§

§

impl<Word> Freeze for SliceLabel<Word>
where Word: Freeze,

§

impl<Word> RefUnwindSafe for SliceLabel<Word>
where Word: RefUnwindSafe,

§

impl<Word> Send for SliceLabel<Word>
where Word: Send,

§

impl<Word> !Sized for SliceLabel<Word>

§

impl<Word> Sync for SliceLabel<Word>
where Word: Sync,

§

impl<Word> Unpin for SliceLabel<Word>
where Word: Unpin,

§

impl<Word> UnsafeUnpin for SliceLabel<Word>
where Word: UnsafeUnpin,

§

impl<Word> UnwindSafe for SliceLabel<Word>
where Word: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<T, W> HasTypeWitness<W> for T
where W: MakeTypeWitness<Arg = T>, T: ?Sized,

Source§

const WITNESS: W = W::MAKE

A constant of the type witness
Source§

impl<T> Identity for T
where T: ?Sized,

Source§

const TYPE_EQ: TypeEq<T, <T as Identity>::Type> = TypeEq::NEW

Proof that Self is the same type as Self::Type, provides methods for casting between Self and Self::Type.
Source§

type Type = T

The same type as Self, used to emulate type equality bounds (T == U) with associated type equality constraints (T: Identity<Type = U>).
Source§

impl<I, T> TransparentWrapperAlloc<I> for T
where T: TransparentWrapper<I> + ?Sized, I: ?Sized,

Source§

fn wrap_vec(s: Vec<Inner>) -> Vec<Self>
where Self: Sized,

Convert a vec of the inner type into a vec of the wrapper type.
Source§

fn wrap_box(s: Box<Inner>) -> Box<Self>

Convert a box to the inner type into a box to the wrapper type.
Source§

fn wrap_rc(s: Rc<Inner>) -> Rc<Self>

Convert an Rc to the inner type into an Rc to the wrapper type.
Source§

fn wrap_arc(s: Arc<Inner>) -> Arc<Self>

Convert an Arc to the inner type into an Arc to the wrapper type.
Source§

fn peel_vec(s: Vec<Self>) -> Vec<Inner>
where Self: Sized,

Convert a vec of the wrapper type into a vec of the inner type.
Source§

fn peel_box(s: Box<Self>) -> Box<Inner>

Convert a box to the wrapper type into a box to the inner type.
Source§

fn peel_rc(s: Rc<Self>) -> Rc<Inner>

Convert an Rc to the wrapper type into an Rc to the inner type.
Source§

fn peel_arc(s: Arc<Self>) -> Arc<Inner>

Convert an Arc to the wrapper type into an Arc to the inner type.