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§
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>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".