pub struct Flag { /* private fields */ }
Available on crate feature
alloc
only.Expand description
A flag type that completes when all it’s references are marked or dropped.
This flag drops loudly by default (a.k.a will complete when dropped),
but can be droped silently with silent_drop
Implementations§
Source§impl Flag
impl Flag
Sourcepub unsafe fn into_raw(self) -> *const ()
pub unsafe fn into_raw(self) -> *const ()
See Arc::into_raw
Sourcepub unsafe fn from_raw(ptr: *const ()) -> Self
pub unsafe fn from_raw(ptr: *const ()) -> Self
See Arc::from_raw
pub fn has_subscriber(&self) -> bool
Sourcepub fn silent_drop(self)
pub fn silent_drop(self)
Drops the flag without notifying it as completed. This method may leak memory.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Flag
impl !RefUnwindSafe for Flag
impl Send for Flag
impl Sync for Flag
impl Unpin for Flag
impl !UnwindSafe for Flag
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