pub struct Event<B> {
pub offset: u64,
pub timestamp_ms: u64,
pub namespace: String,
pub body: B,
}Expand description
One durable, offset-ordered fact carrying a payload of type B.
The engine treats body as opaque bytes-to-be; it round-trips it
through serde without ever matching on it.
Fields§
§offset: u64Assigned by the log at append.
timestamp_ms: u64Wall clock, informational only — offset is the ordering.
namespace: Stringe.g. session id.
body: BThe application payload; opaque to the engine.
Trait Implementations§
Source§impl<'de, B> Deserialize<'de> for Event<B>where
B: Deserialize<'de>,
impl<'de, B> Deserialize<'de> for Event<B>where
B: Deserialize<'de>,
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<B> Freeze for Event<B>where
B: Freeze,
impl<B> RefUnwindSafe for Event<B>where
B: RefUnwindSafe,
impl<B> Send for Event<B>where
B: Send,
impl<B> Sync for Event<B>where
B: Sync,
impl<B> Unpin for Event<B>where
B: Unpin,
impl<B> UnsafeUnpin for Event<B>where
B: UnsafeUnpin,
impl<B> UnwindSafe for Event<B>where
B: UnwindSafe,
Blanket Implementations§
impl<T> Body for T
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