pub struct IdempotentCommand { /* private fields */ }Expand description
One immutable idempotent command used by every automatic retry attempt.
Generic transport code retains the opaque input byte-for-byte but cannot identify or validate the contract field carrying an idempotency key. Generated command modules bind their typed key to both execution input and explicit outcome recovery. The server remains authoritative for schema and idempotency validation.
Implementations§
Source§impl IdempotentCommand
impl IdempotentCommand
Sourcepub fn new(
command_name: impl Into<String>,
expected_contract_version: Option<u64>,
input: Value,
) -> Result<Self, CommandShapeError>
pub fn new( command_name: impl Into<String>, expected_contract_version: Option<u64>, input: Value, ) -> Result<Self, CommandShapeError>
Constructs one immutable generic command submission.
Sourcepub fn command_name(&self) -> &str
pub fn command_name(&self) -> &str
Borrows the exact command name reused by every attempt.
Sourcepub const fn expected_contract_version(&self) -> Option<u64>
pub const fn expected_contract_version(&self) -> Option<u64>
Returns the explicit contract version, when one was selected.
Trait Implementations§
Source§impl Clone for IdempotentCommand
impl Clone for IdempotentCommand
Source§fn clone(&self) -> IdempotentCommand
fn clone(&self) -> IdempotentCommand
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for IdempotentCommand
impl Debug for IdempotentCommand
Source§impl PartialEq for IdempotentCommand
impl PartialEq for IdempotentCommand
Source§fn eq(&self, other: &IdempotentCommand) -> bool
fn eq(&self, other: &IdempotentCommand) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for IdempotentCommand
Auto Trait Implementations§
impl Freeze for IdempotentCommand
impl RefUnwindSafe for IdempotentCommand
impl Send for IdempotentCommand
impl Sync for IdempotentCommand
impl Unpin for IdempotentCommand
impl UnsafeUnpin for IdempotentCommand
impl UnwindSafe for IdempotentCommand
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§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].