Trait tokio::sync::mpsc::chan::Semaphore

source ·
pub(crate) trait Semaphore {
    // Required methods
    fn is_idle(&self) -> bool;
    fn add_permit(&self);
    fn add_permits(&self, n: usize);
    fn close(&self);
    fn is_closed(&self) -> bool;
}

Required Methods§

source

fn is_idle(&self) -> bool

source

fn add_permit(&self)

source

fn add_permits(&self, n: usize)

source

fn close(&self)

source

fn is_closed(&self) -> bool

Implementors§

source§

impl Semaphore for tokio::sync::mpsc::bounded::Semaphore

source§

impl Semaphore for tokio::sync::mpsc::unbounded::Semaphore