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. Chunk
targets are rollover thresholds, while individual-file streams seal every
record immediately. The queue byte limit is strict in either layout.
Implementations§
Source§impl StateStreamConfig
impl StateStreamConfig
Sourcepub fn new<I, K>(
name: impl Into<String>,
fields: I,
sampling_interval: SamplingInterval,
storage: Option<StateStreamStorage>,
) -> Self
pub fn new<I, K>( name: impl Into<String>, fields: I, sampling_interval: SamplingInterval, storage: Option<StateStreamStorage>, ) -> Self
Creates a stream whose relative output directory initially equals its logical name.
storage == None inherits writer-wide storage. Non-zero types make
explicit 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.
Sourcepub fn relative_directory(&self) -> &str
pub fn relative_directory(&self) -> &str
Returns the relative directory beneath the recording root.
Sourcepub const fn sampling_interval(&self) -> SamplingInterval
pub const fn sampling_interval(&self) -> SamplingInterval
Returns the sampling policy.
Sourcepub const fn storage(&self) -> Option<StateStreamStorage>
pub const fn storage(&self) -> Option<StateStreamStorage>
Returns stream-specific storage, or None when writer storage applies.
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