Skip to main content

TransportedLinkTable

Trait TransportedLinkTable 

Source
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§

Source

fn capacity(&self) -> usize

Source

fn len(&self) -> usize

Source

fn entries(&self) -> &[TransportedLink]

Source

fn entries_mut(&mut self) -> &mut [TransportedLink]

Source

fn push(&mut self, entry: TransportedLink) -> Result<(), TablePushError>

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 deadline_updated(&mut self, _index: usize)

Source

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

Source

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§

Source§

impl TransportedLinkTable for HeapTransportedLinkTable

Source§

impl<const MAX_TRANSIT_LINKS: usize, A> TransportedLinkTable for FixedHeapTransportedLinkTable<MAX_TRANSIT_LINKS, A>
where A: Allocator,

Available on crate feature external-alloc only.
Source§

impl<const MAX_TRANSIT_LINKS: usize> TransportedLinkTable for FixedTransportedLinkTable<MAX_TRANSIT_LINKS>