Skip to main content

SeenPathRequestTable

Trait SeenPathRequestTable 

Source
pub trait SeenPathRequestTable {
    // Required methods
    fn capacity(&self) -> usize;
    fn len(&self) -> usize;
    fn destinations(&self) -> &[DestinationHash];
    fn ids(&self) -> &[[u8; 16]];
    fn remember(&mut self, destination: DestinationHash, id: [u8; 16]);

    // Provided method
    fn is_empty(&self) -> bool { ... }
}

Required Methods§

Source

fn capacity(&self) -> usize

Source

fn len(&self) -> usize

Source

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

Source

fn ids(&self) -> &[[u8; 16]]

Source

fn remember(&mut self, destination: DestinationHash, id: [u8; 16])

Record one (destination, id), evicting the oldest when full (FIFO).

Provided Methods§

Source

fn is_empty(&self) -> bool

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§

Source§

impl SeenPathRequestTable for HeapSeenPathRequestTable

Source§

impl<const MAX_SEEN_PATH_REQUESTS: usize> SeenPathRequestTable for FixedSeenPathRequestTable<MAX_SEEN_PATH_REQUESTS>