pub struct PersistableEvent<M> {
pub kind: String,
pub data: Vec<u8>,
pub metadata: M,
}Expand description
Raw event data ready to be written to a store backend.
This is the boundary between Repository and EventStore. Repository
serializes events to this form, EventStore adds position and persistence.
Generic over metadata type M to support different metadata structures.
Fields§
§kind: String§data: Vec<u8>§metadata: MTrait Implementations§
Source§impl<M: Clone> Clone for PersistableEvent<M>
impl<M: Clone> Clone for PersistableEvent<M>
Source§fn clone(&self) -> PersistableEvent<M>
fn clone(&self) -> PersistableEvent<M>
Returns a duplicate of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl<M> Freeze for PersistableEvent<M>where
M: Freeze,
impl<M> RefUnwindSafe for PersistableEvent<M>where
M: RefUnwindSafe,
impl<M> Send for PersistableEvent<M>where
M: Send,
impl<M> Sync for PersistableEvent<M>where
M: Sync,
impl<M> Unpin for PersistableEvent<M>where
M: Unpin,
impl<M> UnwindSafe for PersistableEvent<M>where
M: UnwindSafe,
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)