TimerTimeoutCollection

Trait TimerTimeoutCollection 

Source
pub trait TimerTimeoutCollection<ITEM: PartialEq + Eq + Display + Debug> {
    // Required methods
    fn new() -> Self;
    fn push(&mut self, item: ITEM);
    fn into_option(self) -> Option<Self>
       where Self: Sized;
}
Expand description

A trait for the generalization of the collection type which is used to collect the timeout values i.e ticket IDs.

Required Methods§

Source

fn new() -> Self

Initializes the instance.

Source

fn push(&mut self, item: ITEM)

Store the ITEM in the collection.

Source

fn into_option(self) -> Option<Self>
where Self: Sized,

Wraps the instance into Option. If collection is empty a Option::None should be returned.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<ITEM: PartialEq + Eq + Display + Debug> TimerTimeoutCollection<ITEM> for ()

A dummy implementation when nothing is returned. Unused at the moment.

Source§

fn new() -> Self

Source§

fn push(&mut self, _item: ITEM)

Source§

fn into_option(self) -> Option<Self>

Source§

impl<ITEM: PartialEq + Eq + Display + Debug> TimerTimeoutCollection<ITEM> for Vec<ITEM>

An implementation for the Vec.

Source§

fn new() -> Self

Source§

fn push(&mut self, item: ITEM)

Source§

fn into_option(self) -> Option<Self>

Implementors§