pub struct PersistedEvent {
pub lsn: i64,
pub tr_id: Uuid,
pub doc_id: String,
pub ts: i64,
pub actor: Option<String>,
pub idempotency_key: String,
pub payload: Vec<u8>,
pub meta: Value,
pub checksum: u32,
}Expand description
事件存储的“仅追加“记录。
不变式:
lsn为后端分配的单调递增日志序号idempotency_key全局唯一,用于请求重试的幂等去重checksum对(压缩/加密后的)payload计算得到
Fields§
§lsn: i64§tr_id: Uuid§doc_id: String§ts: i64§actor: Option<String>§idempotency_key: String§payload: Vec<u8>§meta: Value§checksum: u32Trait Implementations§
Source§impl Clone for PersistedEvent
impl Clone for PersistedEvent
Source§fn clone(&self) -> PersistedEvent
fn clone(&self) -> PersistedEvent
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PersistedEvent
impl Debug for PersistedEvent
Source§impl<'de> Deserialize<'de> for PersistedEvent
impl<'de> Deserialize<'de> for PersistedEvent
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
Auto Trait Implementations§
impl Freeze for PersistedEvent
impl RefUnwindSafe for PersistedEvent
impl Send for PersistedEvent
impl Sync for PersistedEvent
impl Unpin for PersistedEvent
impl UnwindSafe for PersistedEvent
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Message for T
impl<T> Message for T
Source§fn from_boxed(m: BoxedMessage) -> Result<Self, BoxedDowncastErr>
fn from_boxed(m: BoxedMessage) -> Result<Self, BoxedDowncastErr>
Convert a BoxedMessage to this concrete type
Source§fn box_message(self, pid: &ActorId) -> Result<BoxedMessage, BoxedDowncastErr>
fn box_message(self, pid: &ActorId) -> Result<BoxedMessage, BoxedDowncastErr>
Convert this message to a BoxedMessage