pub struct TransportedLinks<C>where
C: TransportedLinkTable,{ /* private fields */ }Implementations§
Source§impl<C> TransportedLinks<C>where
C: TransportedLinkTable,
impl<C> TransportedLinks<C>where
C: TransportedLinkTable,
pub fn track( &mut self, entry: TransportedLink, ) -> Result<(), TrackTransportedLinkError>
pub fn entry_for(&self, link_id: &LinkId) -> Option<&TransportedLink>
Sourcepub fn validate_by_proof(
&mut self,
link_id: &LinkId,
arrived_on: InterfaceId,
received_hops: u8,
now: InstantMillis,
) -> Result<TransportSwitch, ValidateByProofError>
pub fn validate_by_proof( &mut self, link_id: &LinkId, arrived_on: InterfaceId, received_hops: u8, now: InstantMillis, ) -> Result<TransportSwitch, ValidateByProofError>
The returning LRPROOF’s gate. RNS 1.4.2 transports a proof only when it arrives over the next hop with exactly the remaining hop count. The row validates and the proof leaves toward the initiator’s side. Intentional deviation from reference: a second proof for a validated row is refused, where the reference re-relays it.
pub fn rebalance_and_validate_by_proof( &mut self, link_id: &LinkId, arrived_on: InterfaceId, received_hops: u8, now: InstantMillis, ) -> Result<TransportSwitch, ValidateByProofError>
Sourcepub fn switch_through(
&mut self,
link_id: &LinkId,
arrived_on: InterfaceId,
received_hops: u8,
now: InstantMillis,
) -> Result<TransportSwitch, SwitchError>
pub fn switch_through( &mut self, link_id: &LinkId, arrived_on: InterfaceId, received_hops: u8, now: InstantMillis, ) -> Result<TransportSwitch, SwitchError>
RNS 1.4.2’s link-table relay: a packet switches through the row toward whichever side it did not arrive from, gated on the exact hop count that side expects; one shared interface accepts either count. Intentional deviation from reference: nothing switches before the proof validates the row because no legitimate traffic can flow ahead of the proof.
pub fn earliest_deadline(&self) -> Option<InstantMillis>
pub fn pop_overdue(&mut self, now: InstantMillis) -> Option<TransportedLink>
pub fn cull_interface_orphans( &mut self, interface_present: impl Fn(InterfaceId) -> bool, on_culled: impl FnMut(InterfaceId), )
pub fn transported_link_count_via(&self, interface: InterfaceId) -> usize
pub fn validated_count(&self) -> usize
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
Trait Implementations§
Source§impl<C> Debug for TransportedLinks<C>where
C: Debug + TransportedLinkTable,
impl<C> Debug for TransportedLinks<C>where
C: Debug + TransportedLinkTable,
Source§impl<C> Default for TransportedLinks<C>where
C: Default + TransportedLinkTable,
impl<C> Default for TransportedLinks<C>where
C: Default + TransportedLinkTable,
Source§fn default() -> TransportedLinks<C>
fn default() -> TransportedLinks<C>
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl<C> Freeze for TransportedLinks<C>where
C: Freeze,
impl<C> RefUnwindSafe for TransportedLinks<C>where
C: RefUnwindSafe,
impl<C> Send for TransportedLinks<C>where
C: Send,
impl<C> Sync for TransportedLinks<C>where
C: Sync,
impl<C> Unpin for TransportedLinks<C>where
C: Unpin,
impl<C> UnsafeUnpin for TransportedLinks<C>where
C: UnsafeUnpin,
impl<C> UnwindSafe for TransportedLinks<C>where
C: UnwindSafe,
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