pub struct BoxStorage<S: ?Sized + Storage>(pub Box<S>);
Expand description
Wrapper for a Box<S>
. Needed to implement some traits that could not be implemented on Box directly
Tuple Fields§
§0: Box<S>
Trait Implementations§
Source§impl<S: ?Sized + Storage> AsMut<[MaybeUninit<<S as Storage>::Item>]> for BoxStorage<S>
impl<S: ?Sized + Storage> AsMut<[MaybeUninit<<S as Storage>::Item>]> for BoxStorage<S>
Source§fn as_mut(&mut self) -> &mut [MaybeUninit<S::Item>]
fn as_mut(&mut self) -> &mut [MaybeUninit<S::Item>]
Converts this type into a mutable reference of the (usually inferred) input type.
Source§impl<S: ?Sized + Storage> AsRef<[MaybeUninit<<S as Storage>::Item>]> for BoxStorage<S>
impl<S: ?Sized + Storage> AsRef<[MaybeUninit<<S as Storage>::Item>]> for BoxStorage<S>
Source§fn as_ref(&self) -> &[MaybeUninit<S::Item>]
fn as_ref(&self) -> &[MaybeUninit<S::Item>]
Converts this type into a shared reference of the (usually inferred) input type.
Source§impl<S: ?Sized + Storage> Storage for BoxStorage<S>
impl<S: ?Sized + Storage> Storage for BoxStorage<S>
Source§impl<S: ?Sized + StorageWithCapacity> StorageWithCapacity for BoxStorage<S>
impl<S: ?Sized + StorageWithCapacity> StorageWithCapacity for BoxStorage<S>
Source§fn with_capacity(capacity: usize) -> Self
fn with_capacity(capacity: usize) -> Self
Creates a new storage with at least the given storage capacity
Auto Trait Implementations§
impl<S> Freeze for BoxStorage<S>where
S: ?Sized,
impl<S> RefUnwindSafe for BoxStorage<S>where
S: RefUnwindSafe + ?Sized,
impl<S> Send for BoxStorage<S>
impl<S> Sync for BoxStorage<S>
impl<S> Unpin for BoxStorage<S>where
S: ?Sized,
impl<S> UnwindSafe for BoxStorage<S>where
S: UnwindSafe + ?Sized,
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