Struct Slice
pub struct Slice { /* private fields */ }
Expand description
A slice (range).
endis an exclusive index.- Negative
startorendindices are counted from the back of the axis. - If
endisNone, the slice extends to the end of the axis.
See also the s![]
macro.
Implementations§
Trait Implementations§
§
impl<I> From<RangeInclusive<I>>
for Slice
impl<I> From<RangeInclusive<I>> for Slice
§
fn from(r: RangeInclusive<I>)
-> Slice
fn from(r: RangeInclusive<I>) -> Slice
Converts to this type from the input type.
§
impl<I> From<RangeToInclusive<I>>
for Slice
where
I: AsIndex,
impl<I> From<RangeToInclusive<I>>
for Slice
where
I: AsIndex,
§
fn from(r: RangeToInclusive<I>)
-> Slice
fn from(r: RangeToInclusive<I>) -> Slice
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for Slice
impl RefUnwindSafe for Slice
impl Send for Slice
impl Sync for Slice
impl Unpin for Slice
impl UnwindSafe for Slice
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<T> Instrument for T
impl<T> Instrument for T
§
fn instrument(self, span: Span) ->
Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§
fn in_current_span(self) ->
Instrumented<Self>
fn in_current_span(self) -> 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
more
Source§
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> Pointable for T
impl<T> Pointable for T
§
impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§
impl<T> RangeArg for T
impl<T> RangeArg for T
§
fn into_range(self, shape_dim: usize)
-> Range<usize>
fn into_range(self, shape_dim: usize) -> Range<usize>
Converts into a range for the
tensor.slice_dim()
function