pub struct MuseRecord {
pub schema_version: u32,
pub id: String,
pub stream: StreamRef,
pub sequence: u64,
pub recorded_at: u64,
pub record_type: RecordType,
pub durability: Durability,
pub causation_id: String,
pub payload_type: String,
pub payload_schema_version: u32,
pub payload: Value,
}Expand description
One line of the muse exec --json stream: the journal envelope.
Fields§
§schema_version: u32Envelope schema version (observed: 1).
id: StringUnique record id (UUIDv7-style, monotonic within a stream).
stream: StreamRefThe stream this record belongs to.
sequence: u641-based position within stream.
recorded_at: u64Microseconds since the Unix epoch.
record_type: RecordType§durability: Durability§causation_id: StringId of the command that caused this record.
payload_type: StringDotted payload discriminator, e.g. run.output.delta.
payload_schema_version: u32Version of the payload’s own schema (observed: 1).
payload: ValueRaw payload — lift with MuseRecord::typed_payload.
Implementations§
Source§impl MuseRecord
impl MuseRecord
Sourcepub fn typed_payload(&self) -> Result<MusePayload>
pub fn typed_payload(&self) -> Result<MusePayload>
Parse the payload into its typed form based on payload_type.
Unknown payload types return MusePayload::Unknown carrying the
raw value; a payload that fails to match its expected shape is a
deserialization error (wire drift worth surfacing, not masking).
Trait Implementations§
Source§impl Clone for MuseRecord
impl Clone for MuseRecord
Source§fn clone(&self) -> MuseRecord
fn clone(&self) -> MuseRecord
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 MuseRecord
impl Debug for MuseRecord
Source§impl<'de> Deserialize<'de> for MuseRecord
impl<'de> Deserialize<'de> for MuseRecord
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
Source§impl PartialEq for MuseRecord
impl PartialEq for MuseRecord
Source§impl Serialize for MuseRecord
impl Serialize for MuseRecord
impl StructuralPartialEq for MuseRecord
Auto Trait Implementations§
impl Freeze for MuseRecord
impl RefUnwindSafe for MuseRecord
impl Send for MuseRecord
impl Sync for MuseRecord
impl Unpin for MuseRecord
impl UnsafeUnpin for MuseRecord
impl UnwindSafe for MuseRecord
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