pub struct Notify { /* private fields */ }Implementations§
Source§impl Notify
impl Notify
Sourcepub const fn const_new() -> Self
pub const fn const_new() -> Self
Under --cfg loom, event_listener::Event::new (and loom’s own
AtomicBool::new) are deliberately non-const — loom’s model
needs a runtime execution context to track the value. Only the
const qualifier is affected; the constructed Notify is
identical either way.
pub fn new() -> Self
Sourcepub fn notify_one(&self)
pub fn notify_one(&self)
Wake one waiter, or store a permit for the next waiter if none are currently listening. Multiple calls before a wake do not stack — at most one permit is held at a time.
Sourcepub fn notify_waiters(&self)
pub fn notify_waiters(&self)
Wake every currently-listening waiter. Does NOT store a permit.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Notify
impl RefUnwindSafe for Notify
impl Send for Notify
impl Sync for Notify
impl Unpin for Notify
impl UnsafeUnpin for Notify
impl UnwindSafe for Notify
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