[−][src]Struct len_constraints::slice::Ranged
An immutable slice with a range as length constraint
Methods
impl<'a, T, Start: TypeNum, End: TypeNum> Ranged<'a, T, Start, End>
[src]
pub fn len(&self) -> usize
[src]
The length of the constrained slice
pub fn slice(&self) -> &[T]
[src]
The constrained slice
Trait Implementations
impl<'a, T, Start: TypeNum, End: TypeNum> AsRef<[T]> for Ranged<'a, T, Start, End>
[src]
impl<'a, T: Clone, Start: Clone + TypeNum, End: Clone + TypeNum> Clone for Ranged<'a, T, Start, End>
[src]
fn clone(&self) -> Ranged<'a, T, Start, End>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<'a, T: Copy, Start: Copy + TypeNum, End: Copy + TypeNum> Copy for Ranged<'a, T, Start, End>
[src]
impl<'a, T, Start: TypeNum, End: TypeNum> Into<&'a [T]> for Ranged<'a, T, Start, End>
[src]
impl<'a, T, Start: TypeNum, End: TypeNum> Deref for Ranged<'a, T, Start, End>
[src]
impl<'a, T: Debug, Start: Debug + TypeNum, End: Debug + TypeNum> Debug for Ranged<'a, T, Start, End>
[src]
impl<'a, T, Start: TypeNum, End: TypeNum> TryFrom<&'a [T]> for Ranged<'a, T, Start, End>
[src]
type Error = Box<dyn Error + 'static>
The type returned in the event of a conversion error.
fn try_from(slice: &'a [T]) -> Result<Self, Self::Error>
[src]
Validates slice
against the length constraint and creates the constrained slice with it
impl<'a, T, Start: TypeNum, End: TypeNum, I: SliceIndex<[T]>> Index<I> for Ranged<'a, T, Start, End>
[src]
Auto Trait Implementations
impl<'a, T, Start, End> Send for Ranged<'a, T, Start, End> where
End: Send,
Start: Send,
T: Sync,
End: Send,
Start: Send,
T: Sync,
impl<'a, T, Start, End> Sync for Ranged<'a, T, Start, End> where
End: Sync,
Start: Sync,
T: Sync,
End: Sync,
Start: Sync,
T: Sync,
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,