pub struct EventBatch {
pub account_id: AccountId,
pub case_key: CaseKey,
pub command_id: CommandId,
pub revision: CaseRevision,
pub events: Vec<CommittedEvent<Value>>,
}Expand description
The events one command committed, with the revision they produced.
Fields§
§account_id: AccountIdOwning tenant.
case_key: CaseKeyThe case.
command_id: CommandIdThe command that produced the events.
revision: CaseRevisionRevision after the commit.
events: Vec<CommittedEvent<Value>>The events, in commit order.
Implementations§
Source§impl EventBatch
impl EventBatch
Sourcepub fn new(
account_id: AccountId,
case_key: CaseKey,
command_id: CommandId,
revision: CaseRevision,
events: Vec<CommittedEvent<Value>>,
) -> Self
pub fn new( account_id: AccountId, case_key: CaseKey, command_id: CommandId, revision: CaseRevision, events: Vec<CommittedEvent<Value>>, ) -> Self
Builds a batch from an already erased list of events.
Sourcepub fn from_commit<S, E: Serialize>(
account_id: AccountId,
case_key: CaseKey,
command_id: CommandId,
commit: &Commit<S, E>,
) -> Result<Self, StoreError>
pub fn from_commit<S, E: Serialize>( account_id: AccountId, case_key: CaseKey, command_id: CommandId, commit: &Commit<S, E>, ) -> Result<Self, StoreError>
Trait Implementations§
Source§impl Clone for EventBatch
impl Clone for EventBatch
Source§impl Debug for EventBatch
impl Debug for EventBatch
Source§impl<'de> Deserialize<'de> for EventBatch
impl<'de> Deserialize<'de> for EventBatch
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for EventBatch
Source§impl PartialEq for EventBatch
impl PartialEq for EventBatch
Source§impl Serialize for EventBatch
impl Serialize for EventBatch
impl StructuralPartialEq for EventBatch
Auto Trait Implementations§
impl Freeze for EventBatch
impl RefUnwindSafe for EventBatch
impl Send for EventBatch
impl Sync for EventBatch
impl Unpin for EventBatch
impl UnsafeUnpin for EventBatch
impl UnwindSafe for EventBatch
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.