rustubs::proc::sync::semaphore

Trait ResourceMan

Source
pub trait ResourceMan<E>
where E: Copy + Clone,
{ // Required methods fn get_resource(&mut self) -> Option<E>; fn insert_resource(&mut self, e: E) -> bool; }
Expand description

wherever resoure management behind semaphore must provide get and insert function. They do not need to be atomic. Normaly they only needs to be wrappers for e.g. enque and deque.

Required Methods§

Source

fn get_resource(&mut self) -> Option<E>

Source

fn insert_resource(&mut self, e: E) -> bool

Implementations on Foreign Types§

Source§

impl<E> ResourceMan<E> for VecDeque<E>
where E: Copy + Clone,

Source§

fn get_resource(&mut self) -> Option<E>

Source§

fn insert_resource(&mut self, e: E) -> bool

Implementors§