pub trait Snapshot:
Send
+ Sync
+ 'static {
// Provided method
fn size_bytes(&self) -> usize { ... }
}Expand description
Producer-side snapshot of current state. Whatever the consumer
needs to bootstrap its local model to match the producer at attach
time. For tear: a PaneSnapshot (grid + cursor + flags). For a
WebSocket: the last N messages. For a Kubernetes log stream: the
tail of stdout up to attach time.
Implementors keep the trait minimal so engate stays generic; transport-specific serialization is the implementor’s concern.
Provided Methods§
Sourcefn size_bytes(&self) -> usize
fn size_bytes(&self) -> usize
Approximate byte size of the snapshot. Used for tracing / metrics (“how much history did we replay on attach?”).
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".