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 moreSource§impl Debug for StateStreamConfig
impl Debug for StateStreamConfig
Source§impl<'de> Deserialize<'de> for StateStreamConfig
impl<'de> Deserialize<'de> for StateStreamConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for StateStreamConfig
Source§impl PartialEq for StateStreamConfig
impl PartialEq for StateStreamConfig
Source§impl Serialize for StateStreamConfig
impl Serialize for StateStreamConfig
impl StructuralPartialEq for StateStreamConfig
Auto Trait Implementations§
impl Freeze for StateStreamConfig
impl RefUnwindSafe for StateStreamConfig
impl Send for StateStreamConfig
impl Sync for StateStreamConfig
impl Unpin for StateStreamConfig
impl UnsafeUnpin for StateStreamConfig
impl UnwindSafe for StateStreamConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more