pub struct EvidenceSinkConfig {
pub enabled: bool,
pub destination: EvidenceSinkDestination,
pub flush_on_write: bool,
pub max_bytes: u64,
}Expand description
Configuration for evidence logging.
Fields§
§enabled: boolWhether evidence logging is enabled.
destination: EvidenceSinkDestinationOutput destination for JSONL lines.
flush_on_write: boolFlush after every line (recommended for tests/e2e capture).
max_bytes: u64Maximum total bytes to write before silently stopping.
Only enforced for file destinations. 0 means unlimited.
Defaults to DEFAULT_MAX_EVIDENCE_BYTES (50 MiB).
Implementations§
Source§impl EvidenceSinkConfig
impl EvidenceSinkConfig
Sourcepub fn enabled_stdout() -> Self
pub fn enabled_stdout() -> Self
Enable logging to stdout with flush-on-write.
Sourcepub fn enabled_file(path: impl Into<PathBuf>) -> Self
pub fn enabled_file(path: impl Into<PathBuf>) -> Self
Enable logging to a file with flush-on-write.
Sourcepub fn with_enabled(self, enabled: bool) -> Self
pub fn with_enabled(self, enabled: bool) -> Self
Set whether logging is enabled.
Sourcepub fn with_destination(self, destination: EvidenceSinkDestination) -> Self
pub fn with_destination(self, destination: EvidenceSinkDestination) -> Self
Set the destination for evidence output.
Sourcepub fn with_flush_on_write(self, enabled: bool) -> Self
pub fn with_flush_on_write(self, enabled: bool) -> Self
Set flush-on-write behavior.
Sourcepub fn with_max_bytes(self, max_bytes: u64) -> Self
pub fn with_max_bytes(self, max_bytes: u64) -> Self
Set maximum bytes before the sink silently stops writing.
Use 0 for unlimited (not recommended for file destinations).
Trait Implementations§
Source§impl Clone for EvidenceSinkConfig
impl Clone for EvidenceSinkConfig
Source§fn clone(&self) -> EvidenceSinkConfig
fn clone(&self) -> EvidenceSinkConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for EvidenceSinkConfig
impl Debug for EvidenceSinkConfig
Auto Trait Implementations§
impl Freeze for EvidenceSinkConfig
impl RefUnwindSafe for EvidenceSinkConfig
impl Send for EvidenceSinkConfig
impl Sync for EvidenceSinkConfig
impl Unpin for EvidenceSinkConfig
impl UnsafeUnpin for EvidenceSinkConfig
impl UnwindSafe for EvidenceSinkConfig
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
Mutably borrows from an owned value. Read more