Skip to main content

DeadlineOutcomeInto

Enum DeadlineOutcomeInto 

Source
pub enum DeadlineOutcomeInto {
    Reply(usize),
    SendFailed,
    PeerDied,
    QueueFull,
    Timeout,
}
Expand description

Outcome of ServiceContext::request_with_reply_deadline_outcome_into - the buffer-writing twin of DeadlineOutcome.

It exists because the _into form collapsed all four outcomes into Option<usize>, and the two that matter are OPPOSITES. SendFailed means the request never left, so nothing can arrive late and retrying after a reacquire is safe. Timeout means it DID leave, so a late reply is still coming and re-sending desyncs the protocol - every later reply is matched to the wrong request. A caller handed None cannot tell those apart, so it must either never retry (and stay broken after a peer restarts) or always retry (and desync). fs had the first of those.

Variants§

§

Reply(usize)

A reply arrived; the payload is in the caller’s buffer, this many bytes of it.

§

SendFailed

The send never left: the peer’s cap is stale or its name does not currently resolve. Nothing is in flight. Reacquire by name and retry ONCE - this is the only safe retry.

§

PeerDied

The request WAS delivered, and the peer died holding it (ReplyDead, 8.6), so the work may have been done. Re-send only an operation that is safe to repeat (a block read, a rewrite of the same sector). It was folded into SendFailed until 2026-10-10 (backlog/fixed/80 S3); gs::call has kept the two apart all along, as Error::PeerDied against Error::Unreachable.

§

QueueFull

The peer’s queue was full. The request did not leave either, but the peer is alive and busy.

§

Timeout

The request was delivered and no reply came in time. Do NOT re-send.

Trait Implementations§

Source§

impl Debug for DeadlineOutcomeInto

Source§

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

Formats the value using the given formatter. Read more

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> 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 = 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.