pub trait Trace: TraceReader {
// Required methods
fn new(
info: OperatorInfo,
logging: Option<Logger>,
activator: Option<Activator>,
) -> Self;
fn exert(&mut self);
fn set_exert_logic(&mut self, logic: ExertionLogic);
fn insert(&mut self, span: Span<Self::Time, Self::Batch>);
fn close(&mut self);
}Expand description
An append-only collection of (key, val, time, diff) tuples.
The trace itself is opinionated only about Time, which bounds its contents and drives its compaction.
Key, value, and diff opinions live on the batches, which the trace does not constrain.
Required Methods§
Sourcefn new(
info: OperatorInfo,
logging: Option<Logger>,
activator: Option<Activator>,
) -> Self
fn new( info: OperatorInfo, logging: Option<Logger>, activator: Option<Activator>, ) -> Self
Allocates a new empty trace.
Sourcefn set_exert_logic(&mut self, logic: ExertionLogic)
fn set_exert_logic(&mut self, logic: ExertionLogic)
Sets the logic for exertion in the absence of updates.
The function receives an iterator over batch levels, from large to small, as triples (level, count, length),
indicating the level, the number of batches, and their total length in updates. It should return a number of
updates to perform, or None if no work is required.
Sourcefn insert(&mut self, span: Span<Self::Time, Self::Batch>)
fn insert(&mut self, span: Span<Self::Time, Self::Batch>)
Introduces a span of updates to the trace.
Spans describe the time intervals they contain, and they should be added to the trace in contiguous intervals. If a span arrives with a lower bound that does not equal the upper bound of the most recent addition, the trace will add a span with no updates. It is an error to then try to populate that region of time.
This restriction could be relaxed, especially if we discover ways in which span interval order could commute. For now, the trace should complain, to the extent that it cares about contiguous intervals.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".