Skip to main content

WaitNotice

Trait WaitNotice 

Source
pub trait WaitNotice {
    // Required method
    fn waiting(&mut self);
}
Expand description

What: Something told once that an acquirer has to wait, such as a stderr notice. A trait is an interface a type implements. Why: A waiter may tell the user whose lock it waits for; the lock module stays silent.

In TS you’d write (pseudocode):

type OnWait = () => void;

Required Methods§

Source

fn waiting(&mut self)

Called once, when the first attempt finds the lock held.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl WaitNotice for SilentWait

Waiting silently does nothing.