Skip to main content

TransportResponse

Enum TransportResponse 

Source
pub enum TransportResponse {
    Heartbeat,
    BatchEnd {
        id: RequestId,
    },
    BatchEndDegraded {
        id: RequestId,
    },
    ServerBusy {
        id: RequestId,
    },
    Refused {
        id: RequestId,
        kind: RefusalKind,
        reason: &'static str,
    },
    Challenge {
        nonce: [u8; 32],
    },
    AuthFailed,
    ServerReady,
}
Expand description

Transport-level response frames that the server runtime encodes directly, bypassing the application’s ResponseEncoder trait.

These are the pipeline-control and auth-handshake messages that every server sends regardless of the application it hosts.

Every frame that ends a request’s reply names the request: the batch terminators, ServerBusy and Refused carry its RequestId.

Variants§

§

Heartbeat

Periodic keep-alive sent to idle connections.

§

BatchEnd

Marks the end of the response batch for request id, backed as the ack policy in force requires.

Fields

§

BatchEndDegraded

Marks the end of the response batch for request id that only the primary’s own disk backs, a weaker guarantee than the ack policy in force. Sent by a primary halted for want of a replica for a request it had sequenced before the halt (or a query that may reflect such requests), once its own journal holds it. A client that needs the policy’s guarantee treats the request as unconfirmed and reconciles.

Fields

§

ServerBusy

Request id was shed at ingress: not applied, safe to resend. The connection stays open.

Fields

§

Refused

The application’s decoder refused request id: not applied. reason is the decoder’s text, for people; the encoder truncates it to MAX_REFUSAL_REASON bytes on a character boundary.

Fields

§reason: &'static str
§

Challenge

Auth handshake: server → client challenge carrying a 32-byte random nonce. Encoded with the node’s client protocol version in front of the nonce.

Fields

§nonce: [u8; 32]
§

AuthFailed

Auth handshake: server → client rejection.

§

ServerReady

Auth handshake: server → client success.

Trait Implementations§

Source§

impl Clone for TransportResponse

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 Copy for TransportResponse

Source§

impl Debug for TransportResponse

Source§

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

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

impl Eq for TransportResponse

Source§

impl PartialEq for TransportResponse

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 StructuralPartialEq for TransportResponse

Auto Trait Implementations§

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

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.