pub struct WalRecord {
pub record_type: WalRecordType,
pub trace_id: TraceId,
pub node_id: NodeId,
pub timestamp_ns: u64,
pub output_offset: ArenaOffset,
pub output_size: u32,
pub schema_hash: u64,
pub error_message: Option<String>,
pub iteration: u32,
pub metadata: Option<String>,
}Expand description
A single WAL record.
Fields§
§record_type: WalRecordTypeType of this record.
trace_id: TraceIdThe trace this record belongs to.
node_id: NodeIdThe node this record is about (if applicable).
timestamp_ns: u64Timestamp (Unix epoch nanoseconds).
output_offset: ArenaOffsetArena offset for output data (if applicable).
output_size: u32Output size in bytes.
schema_hash: u64Schema version hash.
error_message: Option<String>Error message (if applicable).
iteration: u32Loop iteration number (for loop records).
metadata: Option<String>Additional metadata (JSON-encoded).
Implementations§
Source§impl WalRecord
impl WalRecord
Sourcepub fn trace_start(trace_id: TraceId) -> Self
pub fn trace_start(trace_id: TraceId) -> Self
Create a trace start record.
Sourcepub fn node_start(trace_id: TraceId, node_id: NodeId) -> Self
pub fn node_start(trace_id: TraceId, node_id: NodeId) -> Self
Create a node start record.
Sourcepub fn node_done(
trace_id: TraceId,
node_id: NodeId,
output_offset: ArenaOffset,
output_size: u32,
schema_hash: u64,
) -> Self
pub fn node_done( trace_id: TraceId, node_id: NodeId, output_offset: ArenaOffset, output_size: u32, schema_hash: u64, ) -> Self
Create a node done record.
Sourcepub fn node_error(
trace_id: TraceId,
node_id: NodeId,
error: impl ToString,
) -> Self
pub fn node_error( trace_id: TraceId, node_id: NodeId, error: impl ToString, ) -> Self
Create a node error record.
Sourcepub fn trace_complete(trace_id: TraceId) -> Self
pub fn trace_complete(trace_id: TraceId) -> Self
Create a trace complete record.
Sourcepub fn trace_failed(trace_id: TraceId, error: impl ToString) -> Self
pub fn trace_failed(trace_id: TraceId, error: impl ToString) -> Self
Create a trace failed record.
Sourcepub fn trace_suspended(trace_id: TraceId, node_id: NodeId) -> Self
pub fn trace_suspended(trace_id: TraceId, node_id: NodeId) -> Self
Create a trace suspended record.
Sourcepub fn trace_resumed(trace_id: TraceId) -> Self
pub fn trace_resumed(trace_id: TraceId) -> Self
Create a trace resumed record (for crash recovery or wait resumption).
Sourcepub fn loop_iteration(
trace_id: TraceId,
node_id: NodeId,
iteration: u32,
) -> Self
pub fn loop_iteration( trace_id: TraceId, node_id: NodeId, iteration: u32, ) -> Self
Create a loop iteration record.
Sourcepub fn with_metadata(self, metadata: impl ToString) -> Self
pub fn with_metadata(self, metadata: impl ToString) -> Self
Set metadata on this record.
Sourcepub fn from_bytes(bytes: &[u8]) -> Result<Self>
pub fn from_bytes(bytes: &[u8]) -> Result<Self>
Deserialize a record from bytes.
Sourcepub fn serialized_size(&self) -> usize
pub fn serialized_size(&self) -> usize
Get the total serialized size of this record.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for WalRecord
impl RefUnwindSafe for WalRecord
impl Send for WalRecord
impl Sync for WalRecord
impl Unpin for WalRecord
impl UnwindSafe for WalRecord
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
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
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> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Source§impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
Source§unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
Source§fn resolve_niched(out: Place<NichedOption<T, N1>>)
fn resolve_niched(out: Place<NichedOption<T, N1>>)
out indicating that a T is niched.