pub struct ConversationEvent { /* private fields */ }Expand description
Opaque durable event emitted only by a protocol decision or canonical decode.
Neither header nor body fields are public, so a binding cannot manufacture a typed event from raw lifecycle values.
ⓘ
use liminal_protocol::lifecycle::ConversationEvent;
fn fabricate() {
let _ = ConversationEvent {
conversation_id: 7,
ordinal: 0,
};
}Implementations§
Source§impl ConversationEvent
impl ConversationEvent
Sourcepub const fn conversation_id(&self) -> ConversationId
pub const fn conversation_id(&self) -> ConversationId
Returns the event’s owning conversation.
Sourcepub const fn encoded_len(&self) -> usize
pub const fn encoded_len(&self) -> usize
Returns the exact canonical byte length of this event.
Sourcepub fn encode_canonical(&self) -> Vec<u8> ⓘ
pub fn encode_canonical(&self) -> Vec<u8> ⓘ
Encodes the stable v1 event envelope in network byte order.
Sourcepub fn decode_canonical(
input: &[u8],
) -> Result<Self, ConversationEventDecodeError>
pub fn decode_canonical( input: &[u8], ) -> Result<Self, ConversationEventDecodeError>
Decodes one exact canonical v1 event envelope.
§Errors
Returns ConversationEventDecodeError for truncation, an invalid
magic prefix, an unsupported codec version or body tag, or any declared
body length that differs from the complete supplied frame.
Trait Implementations§
Source§impl Debug for ConversationEvent
impl Debug for ConversationEvent
impl Eq for ConversationEvent
Source§impl PartialEq for ConversationEvent
impl PartialEq for ConversationEvent
impl StructuralPartialEq for ConversationEvent
Auto Trait Implementations§
impl Freeze for ConversationEvent
impl RefUnwindSafe for ConversationEvent
impl Send for ConversationEvent
impl Sync for ConversationEvent
impl Unpin for ConversationEvent
impl UnsafeUnpin for ConversationEvent
impl UnwindSafe for ConversationEvent
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