Skip to main content

TransportedLinks

Struct TransportedLinks 

Source
pub struct TransportedLinks<C>{ /* private fields */ }

Implementations§

Source§

impl<C> TransportedLinks<C>

Source

pub fn track( &mut self, entry: TransportedLink, ) -> Result<(), TrackTransportedLinkError>

Source

pub fn entry_for(&self, link_id: &LinkId) -> Option<&TransportedLink>

Source

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.

Source

pub fn rebalance_and_validate_by_proof( &mut self, link_id: &LinkId, arrived_on: InterfaceId, received_hops: u8, now: InstantMillis, ) -> Result<TransportSwitch, ValidateByProofError>

Source

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.

Source

pub fn earliest_deadline(&self) -> Option<InstantMillis>

Source

pub fn pop_overdue(&mut self, now: InstantMillis) -> Option<TransportedLink>

Source

pub fn cull_interface_orphans( &mut self, interface_present: impl Fn(InterfaceId) -> bool, on_culled: impl FnMut(InterfaceId), )

Source

pub fn validated_count(&self) -> usize

Source

pub fn len(&self) -> usize

Source

pub fn is_empty(&self) -> bool

Trait Implementations§

Source§

impl<C> Debug for TransportedLinks<C>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl<C> Default for TransportedLinks<C>

Source§

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.