pub struct StateStreamConfig { /* private fields */ }Expand description
Configuration for one independently sampled logical output stream.
Field names are exact keys from the run’s SystemStateSchema. Their input order
is irrelevant: the encoder writes them in canonical template order. The
chunk byte limit is a rollover target, so a single larger record remains
intact in its own oversized chunk. The queue byte limit is strict; a record
larger than the complete queue budget is rejected because it can never be
admitted.
Implementations§
Source§impl StateStreamConfig
impl StateStreamConfig
Sourcepub fn new<I, K>(
name: impl Into<String>,
fields: I,
sampling_interval: SamplingInterval,
max_chunk_bytes: NonZeroU64,
queue_bytes: NonZeroU64,
) -> Self
pub fn new<I, K>( name: impl Into<String>, fields: I, sampling_interval: SamplingInterval, max_chunk_bytes: NonZeroU64, queue_bytes: NonZeroU64, ) -> Self
Creates a stream whose relative output directory initially equals its logical name.
Non-zero types make the sampling interval and both storage limits valid by
construction. Names, paths, duplicate fields, and state-key membership
are validated together by
SystemStateWriterBuilder::create_new_recording.
Sourcepub fn with_relative_directory(self, directory: impl Into<String>) -> Self
pub fn with_relative_directory(self, directory: impl Into<String>) -> Self
Overrides the stream’s relative directory beneath the run root.
Absolute paths, empty paths, and . or .. components are rejected at
start. Distinct streams must use distinct directories.
Trait Implementations§
Source§impl Clone for StateStreamConfig
impl Clone for StateStreamConfig
Source§fn clone(&self) -> StateStreamConfig
fn clone(&self) -> StateStreamConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more