pub struct PendingEvent {
pub session_id: SessionId,
pub delivery: Delivery,
pub payload: SessionEventPayload,
}Expand description
An event produced during turn execution, before the session store has
assigned a sequence. Convert to SessionEvent via into_committed once
the store has allocated a sequence number. Holding sequence-less events
until commit makes the commit-then-publish invariant type-enforced.
Fields§
§session_id: SessionId§delivery: Delivery§payload: SessionEventPayloadImplementations§
Source§impl PendingEvent
impl PendingEvent
Sourcepub fn new(
session_id: SessionId,
delivery: Delivery,
payload: SessionEventPayload,
) -> Self
pub fn new( session_id: SessionId, delivery: Delivery, payload: SessionEventPayload, ) -> Self
Build an uncommitted event. The session store assigns its sequence.
Sourcepub fn into_committed(self, sequence: u64) -> SessionEvent
pub fn into_committed(self, sequence: u64) -> SessionEvent
Attach the commit sequence and convert into a committed event.
Trait Implementations§
Source§impl Clone for PendingEvent
impl Clone for PendingEvent
Source§fn clone(&self) -> PendingEvent
fn clone(&self) -> PendingEvent
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 PendingEvent
impl Debug for PendingEvent
Source§impl<'de> Deserialize<'de> for PendingEvent
impl<'de> Deserialize<'de> for PendingEvent
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 PendingEvent
Source§impl JsonSchema for PendingEvent
impl JsonSchema for PendingEvent
Source§fn schema_name() -> String
fn schema_name() -> String
The name of the generated JSON Schema. Read more
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
Whether JSON Schemas generated for this type should be re-used where possible using the
$ref keyword. Read moreSource§impl PartialEq for PendingEvent
impl PartialEq for PendingEvent
Source§fn eq(&self, other: &PendingEvent) -> bool
fn eq(&self, other: &PendingEvent) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for PendingEvent
impl Serialize for PendingEvent
impl StructuralPartialEq for PendingEvent
Auto Trait Implementations§
impl Freeze for PendingEvent
impl RefUnwindSafe for PendingEvent
impl Send for PendingEvent
impl Sync for PendingEvent
impl Unpin for PendingEvent
impl UnsafeUnpin for PendingEvent
impl UnwindSafe for PendingEvent
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,
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§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.