pub struct Execute {
pub lease_id: String,
pub command: Option<Command>,
pub history: Vec<Event>,
pub expected_version: u64,
pub snapshot: Option<Snapshot>,
pub received_at: i64,
pub deadline: i64,
pub vault: Vec<VaultValue>,
pub more: bool,
}Expand description
A command for the worker to run. Answer with a Result or a Rejection of the same lease_id
before deadline; after it, the command goes to another worker and a late answer is ignored.
Fields§
§lease_id: String§command: Option<Command>as the client sent it, with its signature
history: Vec<Event>events after snapshot.version, or all events without one
expected_version: u64The aggregate’s current version (0: no events yet); the result’s events follow it.
snapshot: Option<Snapshot>the latest snapshot, if any
received_at: i64ms since epoch when the kernel accepted the command; stable across retries
deadline: i64ms since epoch when the lease expires and the command goes to another worker
vault: Vec<VaultValue>the values the command and the history refer to, unless erased
more: boolThe history does not fit one message; ExecuteMore messages of the same
lease_id follow, in order, with the rest of it (other leases’ messages may come between).
Run the command once the last one (more false) has arrived.
Trait Implementations§
Source§impl Message for Execute
impl Message for Execute
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self.impl StructuralPartialEq for Execute
Auto Trait Implementations§
impl Forget for Execute
impl Freeze for Executewhere
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
PhantomData<Attribute>: Freeze,
PhantomData<String>: Freeze,
PhantomData<Event>: Freeze,
PhantomData<VaultValue>: Freeze,
impl Move for Execute
impl RefUnwindSafe for Execute
impl Send for Executewhere
RawVecInner: Send,
impl Sync for Executewhere
RawVecInner: Sync,
impl Unpin for Execute
impl UnsafeUnpin for Executewhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<Attribute>: UnsafeUnpin,
PhantomData<String>: UnsafeUnpin,
PhantomData<Event>: UnsafeUnpin,
PhantomData<VaultValue>: UnsafeUnpin,
impl UnwindSafe for Executewhere
RawVecInner: UnwindSafe,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
T in a tonic::Request