Skip to main content

Inbound

Enum Inbound 

Source
pub enum Inbound<'d> {
    Deliver(Delivery<'d>),
    Nak {
        to: SocketAddrV4,
        code: BvlcResultCode,
        malformed: bool,
    },
    Bbmd(ForBbmd<'d>),
    Discarded(Discard),
    Matched {
        exchange: ExchangeId,
        message: Result<Bvll<'d>, BvllError>,
        accepted: bool,
        settled: bool,
    },
    Duplicate {
        exchange: ExchangeId,
    },
    Unmatched {
        peer: SocketAddrV4,
        code: Option<BvlcResultCode>,
        late: bool,
    },
}
Expand description

A received datagram’s fate, with responses matched to this node’s own exchanges.

Variants§

§

Deliver(Delivery<'d>)

Hand an NPDU up (Received::Deliver).

§

Nak

Send a NAK (Received::Nak).

Fields

§to: SocketAddrV4

The request’s source.

§code: BvlcResultCode

The request’s own NAK.

§malformed: bool

The request was malformed.

§

Bbmd(ForBbmd<'d>)

The BBMD’s share (Received::Bbmd).

§

Discarded(Discard)

§

Matched

The response answers exchange. A malformed table ACK still completes the exchange it fits, with the codec’s error, and so does one Policy::accept_table refused, as received.

Fields

§exchange: ExchangeId

The exchange.

§message: Result<Bvll<'d>, BvllError>

The response.

§accepted: bool

Whether the codec decoded it and Policy::accept_table took it (Response::accepted). Only an accepted response counts as an answer; the caller fails the exchange otherwise.

§settled: bool

Whether the exchange ended now. When it beat Node::exchange_sent, the caller keeps the response until that returns true.

§

Duplicate

A second response for an exchange already holding one that beat its send. The first is kept; drop this one.

Fields

§exchange: ExchangeId

The exchange.

§

Unmatched

The response answers no live exchange. Well-formed ones count as unmatched, malformed ones as malformed (NodeCounters).

Fields

§peer: SocketAddrV4

Who sent it.

§code: Option<BvlcResultCode>

A well-formed BVLC-Result’s code.

§late: bool

It came within one response timeout of an exchange it fits ending: probably that exchange’s answer, too late.

Trait Implementations§

Source§

impl<'d> Clone for Inbound<'d>

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<'d> Copy for Inbound<'d>

Source§

impl<'d> Debug for Inbound<'d>

Source§

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

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

impl<'d> Eq for Inbound<'d>

Source§

impl<'d> PartialEq for Inbound<'d>

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl<'d> StructuralPartialEq for Inbound<'d>

Auto Trait Implementations§

§

impl<'d> Freeze for Inbound<'d>

§

impl<'d> RefUnwindSafe for Inbound<'d>

§

impl<'d> Send for Inbound<'d>

§

impl<'d> Sync for Inbound<'d>

§

impl<'d> Unpin for Inbound<'d>

§

impl<'d> UnsafeUnpin for Inbound<'d>

§

impl<'d> UnwindSafe for Inbound<'d>

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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.