pub trait SliceOperator<E: CubeType>: CubeType<ExpandType = Self::Expand> {
type Expand: SliceOperatorExpand<E>;
// Provided methods
fn slice<Start: Index, End: Index>(
&self,
start: Start,
end: End,
) -> Slice<E> ⓘ { ... }
fn __expand_slice(
scope: &mut Scope,
expand: Self::Expand,
start: ExpandElementTyped<u32>,
end: ExpandElementTyped<u32>,
) -> ExpandElementTyped<Slice<E>> { ... }
fn slice_mut<Start: Index, End: Index>(
&mut self,
start: Start,
end: End,
) -> SliceMut<E> { ... }
fn __expand_slice_mut(
scope: &mut Scope,
expand: Self::Expand,
start: ExpandElementTyped<u32>,
end: ExpandElementTyped<u32>,
) -> ExpandElementTyped<SliceMut<E>> { ... }
fn to_slice(&self) -> Slice<E> ⓘ { ... }
fn __expand_to_slice(
scope: &mut Scope,
expand: Self::Expand,
) -> ExpandElementTyped<Slice<E>> { ... }
fn to_slice_mut(&mut self) -> SliceMut<E> { ... }
fn __expand_to_slice_mut(
scope: &mut Scope,
expand: Self::Expand,
) -> ExpandElementTyped<SliceMut<E>> { ... }
}
Required Associated Types§
type Expand: SliceOperatorExpand<E>
Provided Methods§
Sourcefn slice<Start: Index, End: Index>(&self, start: Start, end: End) -> Slice<E> ⓘ
fn slice<Start: Index, End: Index>(&self, start: Start, end: End) -> Slice<E> ⓘ
Return a read-only view of all elements comprise between the start
and end
indices.
In checked
mode, if the end
index is out-of-bound, it is replaced by
the length of self
.
Sourcefn __expand_slice(
scope: &mut Scope,
expand: Self::Expand,
start: ExpandElementTyped<u32>,
end: ExpandElementTyped<u32>,
) -> ExpandElementTyped<Slice<E>>
fn __expand_slice( scope: &mut Scope, expand: Self::Expand, start: ExpandElementTyped<u32>, end: ExpandElementTyped<u32>, ) -> ExpandElementTyped<Slice<E>>
Expand function of SliceOperator::slice.
Sourcefn slice_mut<Start: Index, End: Index>(
&mut self,
start: Start,
end: End,
) -> SliceMut<E>
fn slice_mut<Start: Index, End: Index>( &mut self, start: Start, end: End, ) -> SliceMut<E>
Return a read-write view of all elements comprise between the start
and end
indices.
In checked
mode, if the end
index is out-of-bound, it is replaced by
the length of self
.
Sourcefn __expand_slice_mut(
scope: &mut Scope,
expand: Self::Expand,
start: ExpandElementTyped<u32>,
end: ExpandElementTyped<u32>,
) -> ExpandElementTyped<SliceMut<E>>
fn __expand_slice_mut( scope: &mut Scope, expand: Self::Expand, start: ExpandElementTyped<u32>, end: ExpandElementTyped<u32>, ) -> ExpandElementTyped<SliceMut<E>>
Expand function of SliceOperator::slice_mut.
Sourcefn __expand_to_slice(
scope: &mut Scope,
expand: Self::Expand,
) -> ExpandElementTyped<Slice<E>>
fn __expand_to_slice( scope: &mut Scope, expand: Self::Expand, ) -> ExpandElementTyped<Slice<E>>
Expand function of SliceOperator::to_slice.
Sourcefn to_slice_mut(&mut self) -> SliceMut<E>
fn to_slice_mut(&mut self) -> SliceMut<E>
Reinterprete the current type as a read-write slice.
Sourcefn __expand_to_slice_mut(
scope: &mut Scope,
expand: Self::Expand,
) -> ExpandElementTyped<SliceMut<E>>
fn __expand_to_slice_mut( scope: &mut Scope, expand: Self::Expand, ) -> ExpandElementTyped<SliceMut<E>>
Expand function of SliceOperator::to_slice_mut.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.