pub struct EventListener { /* private fields */ }Expand description
Implementations§
Source§impl EventListener
impl EventListener
Sourcepub fn is_notified(&self) -> bool
pub fn is_notified(&self) -> bool
Returns true if this listener has been notified.
§Examples
use local_event::Event;
let event = Event::new();
let listener = event.listen();
assert!(!listener.is_notified());
event.notify(1);
assert!(listener.is_notified());Trait Implementations§
Source§impl Drop for EventListener
impl Drop for EventListener
Source§impl Future for EventListener
impl Future for EventListener
Auto Trait Implementations§
impl Freeze for EventListener
impl !RefUnwindSafe for EventListener
impl !Send for EventListener
impl !Sync for EventListener
impl Unpin for EventListener
impl !UnwindSafe for EventListener
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
Source§impl<F> IntoFuture for Fwhere
F: Future,
impl<F> IntoFuture for Fwhere
F: Future,
Source§type IntoFuture = F
type IntoFuture = F
Which kind of future are we turning this into?
Source§fn into_future(self) -> <F as IntoFuture>::IntoFuture
fn into_future(self) -> <F as IntoFuture>::IntoFuture
Creates a future from a value. Read more