pub enum Outcome {
Committed(Vec<StoredEvent>),
Rejected(Rejected),
}Expand description
What became of a command, returned by Kernable::submit.
Variants§
Committed(Vec<StoredEvent>)
The command’s events are stored, in order. Vault fields in them are null (see
StoredEvent::redacted).
Rejected(Rejected)
A handler, a middleware or the kernel rejected the command; nothing was stored but the rejection.
Implementations§
Source§impl Outcome
impl Outcome
Sourcepub fn is_committed(&self) -> bool
pub fn is_committed(&self) -> bool
Whether the command was committed.
Sourcepub fn events(&self) -> &[StoredEvent]
pub fn events(&self) -> &[StoredEvent]
The committed events; none if the command was rejected.
Trait Implementations§
impl StructuralPartialEq for Outcome
Auto Trait Implementations§
impl Forget for Outcome
impl Freeze for Outcomewhere
*const u8 is !null: Freeze,
PhantomData<StoredEvent>: Freeze,
PhantomData<u8>: Freeze,
*const Requirement is !null: Freeze,
PhantomData<Requirement>: Freeze,
impl Move for Outcome
impl RefUnwindSafe for Outcome
impl Send for Outcome
impl Sync for Outcome
impl Unpin for Outcome
impl UnsafeUnpin for Outcomewhere
*const u8 is !null: UnsafeUnpin,
PhantomData<StoredEvent>: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
*const Requirement is !null: UnsafeUnpin,
PhantomData<Requirement>: UnsafeUnpin,
impl UnwindSafe for Outcomewhere
RawVecInner: UnwindSafe,
NonNull<u8>: UnwindSafe,
BTreeMap<String, String>: UnwindSafe,
BoxRaw<Requirement>: 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
Mutably borrows from an owned value. Read more
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>
Wrap the input message
T in a tonic::Request