pub struct OwnedStorage<T> { /* private fields */ }Expand description
Uniquely owned, fixed-size admitted storage. Created by StorageBudget.
Implementations§
Source§impl<T> OwnedStorage<T>
impl<T> OwnedStorage<T>
Sourcepub fn as_mut_slice(&mut self) -> &mut [T]
pub fn as_mut_slice(&mut self) -> &mut [T]
Mutate elements without changing capacity or releasing their charge.
Sourcepub fn is_empty(&self) -> bool
pub fn is_empty(&self) -> bool
Whether the allocation has no elements; it still occupies an object slot.
Sourcepub fn freeze(self) -> SharedStorage<T>
pub fn freeze(self) -> SharedStorage<T>
Make storage shareable without copying its payload. The small Arc
header allocation is outside the managed payload allowance.
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for OwnedStorage<T>
impl<T> RefUnwindSafe for OwnedStorage<T>where
T: RefUnwindSafe,
impl<T> Send for OwnedStorage<T>where
T: Send,
impl<T> Sync for OwnedStorage<T>where
T: Sync,
impl<T> Unpin for OwnedStorage<T>where
T: Unpin,
impl<T> UnsafeUnpin for OwnedStorage<T>
impl<T> UnwindSafe for OwnedStorage<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