#[non_exhaustive]pub enum ModeResponse {
NoOp,
PersistState(Vec<u8>),
Resolve(Vec<u8>),
PersistAndResolve {
state: Vec<u8>,
resolution: Vec<u8>,
},
}Expand description
The result of a Mode processing a message.
The runtime applies this response to mutate session state.
#[non_exhaustive]: downstream wildcard arms must treat unknown responses
as no-ops or rejections, never as resolutions.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
NoOp
No state change needed.
PersistState(Vec<u8>)
Persist updated mode state.
Resolve(Vec<u8>)
Resolve the session with the given resolution data.
PersistAndResolve
Persist mode state and resolve in one step.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ModeResponse
impl RefUnwindSafe for ModeResponse
impl Send for ModeResponse
impl Sync for ModeResponse
impl Unpin for ModeResponse
impl UnsafeUnpin for ModeResponse
impl UnwindSafe for ModeResponse
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request