pub struct Box<P: Pool> { /* private fields */ }
Implementations§
Source§impl<P: Pool> Box<P>
impl<P: Pool> Box<P>
Sourcepub fn new(item: P::Item) -> Option<Self>
pub fn new(item: P::Item) -> Option<Self>
Returns an item from the data pool, if available. Returns None if the data pool is full.
Sourcepub async fn new_async(item: P::Item) -> Option<Self>
pub async fn new_async(item: P::Item) -> Option<Self>
Wait until an item is available in the data pool, then return it. Returns None if the waker pool is full.
pub fn into_raw(b: Self) -> NonNull<P::Item>
pub unsafe fn from_raw(ptr: NonNull<P::Item>) -> Self
Trait Implementations§
Source§impl<P: Pool> AsMutSlice for Box<P>where
P::Item: AsMutSlice,
impl<P: Pool> AsMutSlice for Box<P>where
P::Item: AsMutSlice,
Source§fn as_mut_slice(&mut self) -> &mut [Self::Element]
fn as_mut_slice(&mut self) -> &mut [Self::Element]
Returns the mutable slice view of
Self
Source§impl<P: Pool> AsMutSlice for Box<P>where
P::Item: AsMutSlice,
impl<P: Pool> AsMutSlice for Box<P>where
P::Item: AsMutSlice,
Source§fn as_mut_slice(&mut self) -> &mut [Self::Element]
fn as_mut_slice(&mut self) -> &mut [Self::Element]
Returns the mutable slice view of
Self
Source§impl<P: Pool> Ord for Box<P>
impl<P: Pool> Ord for Box<P>
Source§impl<P: Pool> PartialOrd for Box<P>where
P::Item: PartialOrd,
impl<P: Pool> PartialOrd for Box<P>where
P::Item: PartialOrd,
impl<P: Pool> Eq for Box<P>
impl<P: Pool> Send for Box<P>
impl<P: Pool> StableDeref for Box<P>
impl<P: Pool> Sync for Box<P>
Auto Trait Implementations§
impl<P> Freeze for Box<P>
impl<P> RefUnwindSafe for Box<P>
impl<P> Unpin for Box<P>
impl<P> UnwindSafe for Box<P>
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