pub struct Waiter {
link: AtomicLink,
state: SpinLock<State>,
cancel: fn(usize, &Waiter, bool),
cancel_data: usize,
kind: Kind,
waiting_for: AtomicU8,
}Fields§
§link: AtomicLink§state: SpinLock<State>§cancel: fn(usize, &Waiter, bool)§cancel_data: usize§kind: Kind§waiting_for: AtomicU8Implementations§
Source§impl Waiter
impl Waiter
pub fn new( kind: Kind, cancel: fn(usize, &Waiter, bool), cancel_data: usize, waiting_for: WaitingFor, ) -> Waiter
pub fn kind(&self) -> Kind
pub fn is_linked(&self) -> bool
pub fn is_waiting_for(&self) -> WaitingFor
pub fn set_waiting_for(&self, waiting_for: WaitingFor)
pub fn reset(&self, waiting_for: WaitingFor)
pub fn wait(&self) -> WaitFuture<'_> ⓘ
pub fn wake(&self)
Auto Trait Implementations§
impl !Freeze for Waiter
impl !RefUnwindSafe for Waiter
impl Send for Waiter
impl Sync for Waiter
impl Unpin for Waiter
impl !UnwindSafe for Waiter
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