pub struct Operation {
pub operation_id: Option<OperationId>,
pub batch_id: Option<OperationBatchId>,
pub subject: Option<OperationSubject>,
pub submission: Option<SubmitOperationRequest>,
pub state: i32,
pub cancellation: i32,
pub sequence: u64,
pub progress: Option<OperationProgress>,
pub error: Option<OperationError>,
pub result: Option<OperationResult>,
pub created_at: Option<Timestamp>,
pub updated_at: Option<Timestamp>,
}Fields§
§operation_id: Option<OperationId>§batch_id: Option<OperationBatchId>§subject: Option<OperationSubject>§submission: Option<SubmitOperationRequest>§state: i32§cancellation: i32§sequence: u64Per-operation durable sequence. It starts at one and strictly increases for every persisted state change, including the transition to a terminal state. The terminal snapshot is then frozen.
progress: Option<OperationProgress>§error: Option<OperationError>Present exactly when state is OPERATION_STATE_FAILED.
result: Option<OperationResult>Present only for a completed kind that defines a domain result.
created_at: Option<Timestamp>§updated_at: Option<Timestamp>Implementations§
Source§impl Operation
impl Operation
Sourcepub fn state(&self) -> OperationState
pub fn state(&self) -> OperationState
Returns the enum value of state, or the default if the field is set to an invalid enum value.
Sourcepub fn set_state(&mut self, value: OperationState)
pub fn set_state(&mut self, value: OperationState)
Sets state to the provided enum value.
Sourcepub fn cancellation(&self) -> OperationCancellation
pub fn cancellation(&self) -> OperationCancellation
Returns the enum value of cancellation, or the default if the field is set to an invalid enum value.
Sourcepub fn set_cancellation(&mut self, value: OperationCancellation)
pub fn set_cancellation(&mut self, value: OperationCancellation)
Sets cancellation to the provided enum value.
Trait Implementations§
impl Eq for Operation
Source§impl Message for Operation
impl Message for Operation
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Returns the encoded length of the message without a length delimiter.
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,
Encodes the message to a buffer. Read more
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Encodes the message to a newly allocated buffer.
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,
Encodes the message with a length-delimiter to a buffer. Read more
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,
Encodes the message with a length-delimiter to a newly allocated buffer.
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Decodes an instance of the message from a buffer. Read more
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,
Decodes a length-delimited instance of the message from the buffer.
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,
Decodes an instance of the message from a buffer, and merges it into
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,
Decodes a length-delimited instance of the message from buffer, and
merges it into
self.impl StructuralPartialEq for Operation
Auto Trait Implementations§
impl Freeze for Operation
impl RefUnwindSafe for Operation
impl Send for Operation
impl Sync for Operation
impl Unpin for Operation
impl UnsafeUnpin for Operation
impl UnwindSafe for Operation
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