Skip to main content

LinkTable

Trait LinkTable 

Source
pub trait LinkTable {
Show 13 methods // Required methods fn capacity(&self) -> usize; fn len(&self) -> usize; fn link_ids(&self) -> &[LinkId]; fn timeout_ats(&self) -> &[Option<InstantMillis>]; fn phases(&self) -> &[LinkPhase]; fn phase_mut(&mut self, index: usize) -> &mut LinkPhase; fn set_timeout_at( &mut self, index: usize, timeout_at: Option<InstantMillis>, ); fn push( &mut self, link_id: LinkId, phase: LinkPhase, timeout_at: Option<InstantMillis>, ) -> Result<usize, TrackLinkError>; fn swap_remove(&mut self, index: usize); // Provided methods fn is_empty(&self) -> bool { ... } fn index_of(&self, link_id: &LinkId) -> Option<usize> { ... } fn earliest_indexed_timeout(&mut self) -> Option<InstantMillis> { ... } fn first_due_timeout_matching<P>( &mut self, now: InstantMillis, predicate: P, ) -> Option<usize> where P: FnMut(usize, &LinkPhase) -> bool { ... }
}

Required Methods§

Source

fn capacity(&self) -> usize

Source

fn len(&self) -> usize

Source

fn timeout_ats(&self) -> &[Option<InstantMillis>]

Source

fn phases(&self) -> &[LinkPhase]

Source

fn phase_mut(&mut self, index: usize) -> &mut LinkPhase

Source

fn set_timeout_at(&mut self, index: usize, timeout_at: Option<InstantMillis>)

Source

fn push( &mut self, link_id: LinkId, phase: LinkPhase, timeout_at: Option<InstantMillis>, ) -> Result<usize, TrackLinkError>

Source

fn swap_remove(&mut self, index: usize)

Provided Methods§

Source

fn is_empty(&self) -> bool

Source

fn index_of(&self, link_id: &LinkId) -> Option<usize>

Source

fn earliest_indexed_timeout(&mut self) -> Option<InstantMillis>

Source

fn first_due_timeout_matching<P>( &mut self, now: InstantMillis, predicate: P, ) -> Option<usize>
where P: FnMut(usize, &LinkPhase) -> bool,

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl LinkTable for HeapLinkTable

Source§

impl<const MAX_LINKS: usize, A> LinkTable for FixedHeapLinkTable<MAX_LINKS, A>
where A: Allocator,

Source§

impl<const MAX_LINKS: usize> LinkTable for FixedLinkTable<MAX_LINKS>