Enum CommandOutcome
pub enum CommandOutcome<T> {
Done(T),
Refused(Status, Error),
Unknown,
}Expand description
Result of a trading command: a definite answer, or an outcome nobody knows.
The split exists so that a caller cannot treat a timeout as a refusal. Only Refused proves
that the broker did not act.
Variants§
Done(T)
The broker answered and did the command. Holds the reply.
Refused(Status, Error)
The broker refused; status is its answer.
Unknown
Timeout, break, server fault: the command may or may not have been executed.
Auto Trait Implementations§
impl<T> !RefUnwindSafe for CommandOutcome<T>
impl<T> !UnwindSafe for CommandOutcome<T>
impl<T> Freeze for CommandOutcome<T>where
T: Freeze,
impl<T> Send for CommandOutcome<T>where
T: Send,
impl<T> Sync for CommandOutcome<T>where
T: Sync,
impl<T> Unpin for CommandOutcome<T>where
T: Unpin,
impl<T> UnsafeUnpin for CommandOutcome<T>where
T: UnsafeUnpin,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Applies the layer to a service and wraps it in [
Layered].