pub trait TransportedLinkTable {
// Required methods
fn capacity(&self) -> usize;
fn len(&self) -> usize;
fn entries(&self) -> &[TransportedLink];
fn entries_mut(&mut self) -> &mut [TransportedLink];
fn push(&mut self, entry: TransportedLink) -> Result<(), TablePushError>;
fn swap_remove(&mut self, index: usize);
// Provided methods
fn is_empty(&self) -> bool { ... }
fn index_of(&self, link_id: &LinkId) -> Option<usize> { ... }
fn deadline_updated(&mut self, _index: usize) { ... }
fn earliest_indexed_deadline(&mut self) -> Option<InstantMillis> { ... }
fn first_overdue(&mut self, now: InstantMillis) -> Option<usize> { ... }
}Required Methods§
fn capacity(&self) -> usize
fn len(&self) -> usize
fn entries(&self) -> &[TransportedLink]
fn entries_mut(&mut self) -> &mut [TransportedLink]
fn push(&mut self, entry: TransportedLink) -> Result<(), TablePushError>
fn swap_remove(&mut self, index: usize)
Provided Methods§
fn is_empty(&self) -> bool
fn index_of(&self, link_id: &LinkId) -> Option<usize>
fn deadline_updated(&mut self, _index: usize)
fn earliest_indexed_deadline(&mut self) -> Option<InstantMillis>
fn first_overdue(&mut self, now: InstantMillis) -> Option<usize>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementors§
impl TransportedLinkTable for HeapTransportedLinkTable
impl<const MAX_TRANSIT_LINKS: usize, A> TransportedLinkTable for FixedHeapTransportedLinkTable<MAX_TRANSIT_LINKS, A>where
A: Allocator,
Available on crate feature
external-alloc only.