[−][src]Struct queen::timer::wheel::ByteWheel
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
Auto Trait Implementations
impl<E, R> RefUnwindSafe for ByteWheel<E, R> where
E: RefUnwindSafe,
R: RefUnwindSafe,
E: RefUnwindSafe,
R: RefUnwindSafe,
impl<E, R> Send for ByteWheel<E, R> where
E: Send,
R: Send,
E: Send,
R: Send,
impl<E, R> Sync for ByteWheel<E, R> where
E: Sync,
R: Sync,
E: Sync,
R: Sync,
impl<E, R> Unpin for ByteWheel<E, R> where
E: Unpin,
R: Unpin,
E: Unpin,
R: Unpin,
impl<E, R> UnwindSafe for ByteWheel<E, R> where
E: UnwindSafe,
R: UnwindSafe,
E: UnwindSafe,
R: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,