[][src]Struct queen::timer::wheel::ByteWheel

pub struct ByteWheel<E, R> { /* fields omitted */ }

A single wheel with 256 slots of for elements of E

The R us used to store an array of bytes that are the rest of the delay. This way the same wheel structure can be used at different hierarchical levels.

Implementations

impl<E, R> ByteWheel<E, R>[src]

pub fn new() -> Self[src]

Create a new empty ByteWheel

pub fn pos(&self) -> u8[src]

Returns the index of the pos slot

pub fn advance(&mut self, to: u8)[src]

Advances the wheel pointer to the target index without executing anything

Used for implementing "skip"-behaviours.

pub fn insert(&mut self, pos: u8, e: E, r: R)[src]

Insert an entry at pos into the wheel and store the rest r with it

pub fn is_empty(&self) -> bool[src]

True if the number of entries is 0

pub fn tick(&mut self) -> (Option<EntryList<E, R>>, u8)[src]

Move the wheel by one tick and return all entries in the pos slot together with the index of the next slot

Trait Implementations

impl<E, R> Default for ByteWheel<E, R>[src]

Auto Trait Implementations

impl<E, R> RefUnwindSafe for ByteWheel<E, R> where
    E: RefUnwindSafe,
    R: RefUnwindSafe

impl<E, R> Send for ByteWheel<E, R> where
    E: Send,
    R: Send

impl<E, R> Sync for ByteWheel<E, R> where
    E: Sync,
    R: Sync

impl<E, R> Unpin for ByteWheel<E, R> where
    E: Unpin,
    R: Unpin

impl<E, R> UnwindSafe for ByteWheel<E, R> where
    E: UnwindSafe,
    R: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,