Skip to main content

Slice

Struct Slice 

Source
pub struct Slice(/* private fields */);

Implementations§

Source§

impl Slice

Source

pub fn from_layout(layout: Layout) -> Self

Creates a full slice of the same mode as a Layout.

Source

pub fn is_full(&self) -> bool

Returns true if the slice contains only full axes.

Trait Implementations§

Source§

impl Clone for Slice

Source§

fn clone(&self) -> Slice

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Slice

Source§

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

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

impl Default for Slice

Source§

fn default() -> Slice

Returns the “default value” for a type. Read more
Source§

impl Deref for Slice

Source§

type Target = Arc<[Axis]>

The resulting type after dereferencing.
Source§

fn deref(&self) -> &Self::Target

Dereferences the value.
Source§

impl DerefMut for Slice

Source§

fn deref_mut(&mut self) -> &mut Self::Target

Mutably dereferences the value.
Source§

impl Display for Slice

Source§

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

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

impl Eq for Slice

Source§

impl<T0, T1> From<(T0, T1)> for Slice
where T0: Into<Axis>, T1: Into<Axis>,

Source§

fn from((t_0, t_1): (T0, T1)) -> Self

Converts to this type from the input type.
Source§

impl<T0, T1, T2> From<(T0, T1, T2)> for Slice
where T0: Into<Axis>, T1: Into<Axis>, T2: Into<Axis>,

Source§

fn from((t_0, t_1, t_2): (T0, T1, T2)) -> Self

Converts to this type from the input type.
Source§

impl<T0, T1, T2, T3> From<(T0, T1, T2, T3)> for Slice
where T0: Into<Axis>, T1: Into<Axis>, T2: Into<Axis>, T3: Into<Axis>,

Source§

fn from((t_0, t_1, t_2, t_3): (T0, T1, T2, T3)) -> Self

Converts to this type from the input type.
Source§

impl<T0, T1, T2, T3, T4> From<(T0, T1, T2, T3, T4)> for Slice
where T0: Into<Axis>, T1: Into<Axis>, T2: Into<Axis>, T3: Into<Axis>, T4: Into<Axis>,

Source§

fn from((t_0, t_1, t_2, t_3, t_4): (T0, T1, T2, T3, T4)) -> Self

Converts to this type from the input type.
Source§

impl<T0, T1, T2, T3, T4, T5> From<(T0, T1, T2, T3, T4, T5)> for Slice
where T0: Into<Axis>, T1: Into<Axis>, T2: Into<Axis>, T3: Into<Axis>, T4: Into<Axis>, T5: Into<Axis>,

Source§

fn from((t_0, t_1, t_2, t_3, t_4, t_5): (T0, T1, T2, T3, T4, T5)) -> Self

Converts to this type from the input type.
Source§

impl<T0, T1, T2, T3, T4, T5, T6> From<(T0, T1, T2, T3, T4, T5, T6)> for Slice
where T0: Into<Axis>, T1: Into<Axis>, T2: Into<Axis>, T3: Into<Axis>, T4: Into<Axis>, T5: Into<Axis>, T6: Into<Axis>,

Source§

fn from( (t_0, t_1, t_2, t_3, t_4, t_5, t_6): (T0, T1, T2, T3, T4, T5, T6), ) -> Self

Converts to this type from the input type.
Source§

impl<T0, T1, T2, T3, T4, T5, T6, T7> From<(T0, T1, T2, T3, T4, T5, T6, T7)> for Slice
where T0: Into<Axis>, T1: Into<Axis>, T2: Into<Axis>, T3: Into<Axis>, T4: Into<Axis>, T5: Into<Axis>, T6: Into<Axis>, T7: Into<Axis>,

Source§

fn from( (t_0, t_1, t_2, t_3, t_4, t_5, t_6, t_7): (T0, T1, T2, T3, T4, T5, T6, T7), ) -> Self

Converts to this type from the input type.
Source§

impl From<Arc<[Axis]>> for Slice

Source§

fn from(value: Arc<[Axis]>) -> Self

Converts to this type from the input type.
Source§

impl From<Slice> for Arc<[Axis]>

Source§

fn from(value: Slice) -> Self

Converts to this type from the input type.
Source§

impl<T0: Into<Axis>> From<T0> for Slice

Source§

fn from(t_0: T0) -> Self

Converts to this type from the input type.
Source§

impl From<Vec<Axis>> for Slice

Source§

fn from(value: Vec<Axis>) -> Self

Converts to this type from the input type.
Source§

impl Hash for Slice

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for Slice

Source§

fn eq(&self, other: &Slice) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · 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 StructuralPartialEq for Slice

Auto Trait Implementations§

§

impl Freeze for Slice

§

impl RefUnwindSafe for Slice

§

impl Send for Slice

§

impl Sync for Slice

§

impl Unpin for Slice

§

impl UnsafeUnpin for Slice

§

impl UnwindSafe for Slice

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<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> Downcast<T> for T

Source§

fn downcast(&self) -> &T

Source§

impl<T> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

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<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<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

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

fn clone_into(&self, target: &mut T)

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

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> Upcast<T> for T

Source§

fn upcast(&self) -> Option<&T>

Source§

impl<T> WasmNotSend for T
where T: Send,

Source§

impl<T> WasmNotSendSync for T

Source§

impl<T> WasmNotSync for T
where T: Sync,