pub trait DynBuffer<T: Clone + Send>: Send + Sync {
// Required methods
fn push(&self, value: T);
fn subscribe_boxed(&self) -> Box<dyn BufferReader<T> + Send>;
fn as_any(&self) -> &dyn Any;
}Expand description
Dynamic buffer trait for trait objects (object-safe)
Type-erased interface for buffers that can be stored as trait objects.
Automatically implemented for all Buffer<T> types via blanket impl.
Used when storing heterogeneous buffer types (e.g., in TypedRecord).
Required Methods§
Sourcefn subscribe_boxed(&self) -> Box<dyn BufferReader<T> + Send>
fn subscribe_boxed(&self) -> Box<dyn BufferReader<T> + Send>
Create a boxed reader for consuming values
Returns a type-erased reader. Each reader maintains its own position.