pub struct SeaBoxIn<T, A: Allocator> { /* private fields */ }Expand description
Implementations§
Source§impl<T, A: Allocator> SeaBoxIn<T, A>
impl<T, A: Allocator> SeaBoxIn<T, A>
pub fn try_new(t: T) -> Result<Self, AllocError>
Sourcepub unsafe fn try_emplace(
f: impl FnOnce(&mut MaybeUninit<T>),
) -> Result<Self, AllocError>
pub unsafe fn try_emplace( f: impl FnOnce(&mut MaybeUninit<T>), ) -> Result<Self, AllocError>
§Safety
- Must initialize the given memory.
Note that if T is a ZST, the passed in memory is ephemeral.
pub fn unbox(self) -> T
Sourcepub const unsafe fn from_raw(ptr: *mut T) -> Self
pub const unsafe fn from_raw(ptr: *mut T) -> Self
§Safety
- Must have been allocated by
A. - Must be a valid
T. - This must be the only pointer to the allocation.
pub const fn into_raw(this: Self) -> *mut T
Trait Implementations§
Source§impl<T, A: Allocator> BorrowMut<T> for SeaBoxIn<T, A>
impl<T, A: Allocator> BorrowMut<T> for SeaBoxIn<T, A>
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T: Ord, A: Allocator> Ord for SeaBoxIn<T, A>
impl<T: Ord, A: Allocator> Ord for SeaBoxIn<T, A>
Source§impl<T1, T2, A1: Allocator, A2: Allocator> PartialEq<SeaBoxIn<T2, A2>> for SeaBoxIn<T1, A1>where
T1: PartialEq<T2>,
impl<T1, T2, A1: Allocator, A2: Allocator> PartialEq<SeaBoxIn<T2, A2>> for SeaBoxIn<T1, A1>where
T1: PartialEq<T2>,
Source§impl<T1, T2, A1: Allocator, A2: Allocator> PartialOrd<SeaBoxIn<T2, A2>> for SeaBoxIn<T1, A1>where
T1: PartialOrd<T2>,
impl<T1, T2, A1: Allocator, A2: Allocator> PartialOrd<SeaBoxIn<T2, A2>> for SeaBoxIn<T1, A1>where
T1: PartialOrd<T2>,
impl<T: Eq, A: Allocator> Eq for SeaBoxIn<T, A>
impl<T: Send, A: Allocator + Send> Send for SeaBoxIn<T, A>
impl<T: Sync, A: Allocator + Sync> Sync for SeaBoxIn<T, A>
Auto Trait Implementations§
impl<T, A> Freeze for SeaBoxIn<T, A>
impl<T, A> RefUnwindSafe for SeaBoxIn<T, A>where
T: RefUnwindSafe,
A: RefUnwindSafe,
impl<T, A> Unpin for SeaBoxIn<T, A>
impl<T, A> UnwindSafe for SeaBoxIn<T, A>
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