[−][src]Struct index_ext::tag::Boxed
An owned, allocated slice with a checked length.
Implementations
impl<T: Tag, E> Boxed<E, T>
[src]
pub fn new(inner: Box<[E]>, len: ExactSize<T>) -> Result<Self, Box<[E]>>
[src]
Try to construct an asserted box, returning it on error.
pub fn as_ref(&self) -> Ref<'_, E, T>
[src]
Reference the contents as an asserted Ref
slice.
pub fn as_mut(&mut self) -> Mut<'_, E, T>
[src]
Reference the contents as an asserted mutable Mut
slice.
pub fn get_safe<I: SliceIndex<[E]>>(&self, index: Idx<I, T>) -> &I::Output
[src]
Index the boxed slice unchecked but soundly.
pub fn get_safe_mut<I: SliceIndex<[E]>>(
&mut self,
index: Idx<I, T>
) -> &mut I::Output
[src]
&mut self,
index: Idx<I, T>
) -> &mut I::Output
Mutably index the boxed slice unchecked but soundly.
pub fn into_inner(self) -> Box<[E]>
[src]
Unwrap the inner box, dropping all assertions of safe indexing.
Auto Trait Implementations
impl<T, Tag> Send for Boxed<T, Tag> where
T: Send,
Tag: Send,
T: Send,
Tag: Send,
impl<T, Tag> Sync for Boxed<T, Tag> where
T: Sync,
Tag: Sync,
T: Sync,
Tag: Sync,
impl<T, Tag> Unpin for Boxed<T, Tag> where
Tag: Unpin,
Tag: Unpin,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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>,