pub struct Boxed<T>(pub T);Expand description
A newtype wrapper around T that implements Deref and DerefMut.
Tuple Fields§
§0: TTrait Implementations§
Source§impl<C: Container> Container for Boxed<C>
impl<C: Container> Container for Boxed<C>
Source§type Ref<'a> = Boxed<<C as Container>::Ref<'a>>
type Ref<'a> = Boxed<<C as Container>::Ref<'a>>
For each lifetime, a reference with that lifetime. Read more
Source§type Borrowed<'a> = Boxed<<C as Container>::Borrowed<'a>>
type Borrowed<'a> = Boxed<<C as Container>::Borrowed<'a>>
The type of a borrowed container. Read more
Source§fn borrow<'a>(&'a self) -> Self::Borrowed<'a>
fn borrow<'a>(&'a self) -> Self::Borrowed<'a>
Converts a reference to the type to a borrowed variant.
Source§fn reborrow<'b, 'a: 'b>(item: Self::Borrowed<'a>) -> Self::Borrowed<'b>where
Self: 'a,
fn reborrow<'b, 'a: 'b>(item: Self::Borrowed<'a>) -> Self::Borrowed<'b>where
Self: 'a,
Reborrows the borrowed type to a shorter lifetime. See
Columnar::reborrow for details.Source§fn reborrow_ref<'b, 'a: 'b>(item: Self::Ref<'a>) -> Self::Ref<'b>where
Self: 'a,
fn reborrow_ref<'b, 'a: 'b>(item: Self::Ref<'a>) -> Self::Ref<'b>where
Self: 'a,
Reborrows the borrowed type to a shorter lifetime. See
Columnar::reborrow for details.fn reserve_for<'a, I>(&mut self, selves: I)
Source§impl<C: Index> Index for Boxed<C>
impl<C: Index> Index for Boxed<C>
Source§impl<C: IndexMut> IndexMut for Boxed<C>
impl<C: IndexMut> IndexMut for Boxed<C>
impl<T: Copy> Copy for Boxed<T>
Auto Trait Implementations§
impl<T> Freeze for Boxed<T>where
T: Freeze,
impl<T> RefUnwindSafe for Boxed<T>where
T: RefUnwindSafe,
impl<T> Send for Boxed<T>where
T: Send,
impl<T> Sync for Boxed<T>where
T: Sync,
impl<T> Unpin for Boxed<T>where
T: Unpin,
impl<T> UnwindSafe for Boxed<T>where
T: UnwindSafe,
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