Struct Last
struct Last
Always accesses the last element of the slice.
Examples
use Last;
use SliceIndex;
let s = &;
assert_eq!;
assert_eq!;
Implementations
impl Debug for Last
fn fmt(self: &Self, f: &mut $crate::fmt::Formatter<'_>) -> $crate::fmt::Result
impl Freeze for Last
impl RefUnwindSafe for Last
impl Send for Last
impl Sync for Last
impl Unpin for Last
impl UnwindSafe for Last
impl<T> Any for Last
fn type_id(self: &Self) -> TypeId
impl<T> Borrow for Last
fn borrow(self: &Self) -> &T
impl<T> BorrowMut for Last
fn borrow_mut(self: &mut Self) -> &mut T
impl<T> From for Last
fn from(t: T) -> TReturns the argument unchanged.
impl<T> SliceIndex for Last
fn get(self: Self, slice: &[T]) -> Option<&<Self as >::Output>fn get_mut(self: Self, slice: &mut [T]) -> Option<&mut <Self as >::Output>unsafe fn get_unchecked(self: Self, slice: *const [T]) -> *const <Self as >::Outputunsafe fn get_unchecked_mut(self: Self, slice: *mut [T]) -> *mut <Self as >::Outputfn index(self: Self, slice: &[T]) -> &<Self as >::Outputfn index_mut(self: Self, slice: &mut [T]) -> &mut <Self as >::Output
impl<T, U> Into for Last
fn into(self: Self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom for Last
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T, U> TryInto for Last
fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>