Skip to main content

PendingPathRequestTable

Trait PendingPathRequestTable 

Source
pub trait PendingPathRequestTable {
    // Required methods
    fn capacity(&self) -> usize;
    fn len(&self) -> usize;
    fn destinations(&self) -> &[DestinationHash];
    fn command_ids(&self) -> &[CommandId];
    fn timeout_ats(&self) -> &[InstantMillis];
    fn push(
        &mut self,
        request: PendingPathRequest,
    ) -> Result<usize, TrackPathRequestError>;
    fn swap_remove(&mut self, index: usize);

    // Provided methods
    fn is_empty(&self) -> bool { ... }
    fn index_of(&self, destination: &DestinationHash) -> Option<usize> { ... }
    fn earliest_indexed_timeout(&mut self) -> Option<InstantMillis> { ... }
    fn first_expired(&mut self, now: InstantMillis) -> Option<usize> { ... }
}

Required Methods§

Source

fn capacity(&self) -> usize

Source

fn len(&self) -> usize

Source

fn destinations(&self) -> &[DestinationHash]

Source

fn command_ids(&self) -> &[CommandId]

Source

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

Source

fn push( &mut self, request: PendingPathRequest, ) -> Result<usize, TrackPathRequestError>

Source

fn swap_remove(&mut self, index: usize)

Provided Methods§

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§

Source§

impl PendingPathRequestTable for HeapPendingPathRequestTable

Source§

impl<const MAX_PENDING_PATH_REQUESTS: usize> PendingPathRequestTable for FixedPendingPathRequestTable<MAX_PENDING_PATH_REQUESTS>