pub struct FixedSeenPathRequestTable<const MAX_SEEN_PATH_REQUESTS: usize> { /* private fields */ }Expand description
A fixed-capacity FIFO ring: write_cursor overwrites the oldest id once the array is full, so the set always holds the most recent MAX_SEEN_PATH_REQUESTS.
Trait Implementations§
Source§impl<const MAX_SEEN_PATH_REQUESTS: usize> Debug for FixedSeenPathRequestTable<MAX_SEEN_PATH_REQUESTS>
impl<const MAX_SEEN_PATH_REQUESTS: usize> Debug for FixedSeenPathRequestTable<MAX_SEEN_PATH_REQUESTS>
Source§impl<const MAX_SEEN_PATH_REQUESTS: usize> Default for FixedSeenPathRequestTable<MAX_SEEN_PATH_REQUESTS>
impl<const MAX_SEEN_PATH_REQUESTS: usize> Default for FixedSeenPathRequestTable<MAX_SEEN_PATH_REQUESTS>
Source§fn default() -> FixedSeenPathRequestTable<MAX_SEEN_PATH_REQUESTS>
fn default() -> FixedSeenPathRequestTable<MAX_SEEN_PATH_REQUESTS>
Returns the “default value” for a type. Read more
Source§impl<const MAX_SEEN_PATH_REQUESTS: usize> SeenPathRequestTable for FixedSeenPathRequestTable<MAX_SEEN_PATH_REQUESTS>
impl<const MAX_SEEN_PATH_REQUESTS: usize> SeenPathRequestTable for FixedSeenPathRequestTable<MAX_SEEN_PATH_REQUESTS>
fn capacity(&self) -> usize
fn len(&self) -> usize
fn destinations(&self) -> &[DestinationHash]
fn ids(&self) -> &[[u8; 16]]
Source§fn remember(&mut self, destination: DestinationHash, id: [u8; 16])
fn remember(&mut self, destination: DestinationHash, id: [u8; 16])
Record one
(destination, id), evicting the oldest when full (FIFO).fn is_empty(&self) -> bool
Auto Trait Implementations§
impl<const MAX_SEEN_PATH_REQUESTS: usize> Freeze for FixedSeenPathRequestTable<MAX_SEEN_PATH_REQUESTS>
impl<const MAX_SEEN_PATH_REQUESTS: usize> RefUnwindSafe for FixedSeenPathRequestTable<MAX_SEEN_PATH_REQUESTS>
impl<const MAX_SEEN_PATH_REQUESTS: usize> Send for FixedSeenPathRequestTable<MAX_SEEN_PATH_REQUESTS>
impl<const MAX_SEEN_PATH_REQUESTS: usize> Sync for FixedSeenPathRequestTable<MAX_SEEN_PATH_REQUESTS>
impl<const MAX_SEEN_PATH_REQUESTS: usize> Unpin for FixedSeenPathRequestTable<MAX_SEEN_PATH_REQUESTS>
impl<const MAX_SEEN_PATH_REQUESTS: usize> UnsafeUnpin for FixedSeenPathRequestTable<MAX_SEEN_PATH_REQUESTS>
impl<const MAX_SEEN_PATH_REQUESTS: usize> UnwindSafe for FixedSeenPathRequestTable<MAX_SEEN_PATH_REQUESTS>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more