pub struct RefCountedCell { /* private fields */ }Implementations§
Source§impl RefCountedCell
impl RefCountedCell
Sourcepub const unsafe fn from_raw(
data: NonNull<()>,
vtable: &'static RefCountedCellVTable,
) -> Self
pub const unsafe fn from_raw( data: NonNull<()>, vtable: &'static RefCountedCellVTable, ) -> Self
Creates a new RefCountedCell from the given data and vtable.
The data pointer can be used to store arbitrary data, that won’t be dropped until the last
clone to the RefCountedCell is dropped.
The vtable customizes the behavior of a Waker which gets created from a RawWaker. For each
operation on the Waker, the associated function in the vtable of the underlying RawWaker
will be called.
§Safety
- The value pointed to by
datamust be ’static + Send + Sync
Trait Implementations§
Source§impl Clone for RefCountedCell
impl Clone for RefCountedCell
Source§impl Drop for RefCountedCell
impl Drop for RefCountedCell
impl Send for RefCountedCell
impl Sync for RefCountedCell
Auto Trait Implementations§
impl Freeze for RefCountedCell
impl RefUnwindSafe for RefCountedCell
impl Unpin for RefCountedCell
impl UnwindSafe for RefCountedCell
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