pub struct EvidenceSink { /* private fields */ }Expand description
Shared, line-oriented JSONL sink for evidence logging.
Implementations§
Source§impl EvidenceSink
impl EvidenceSink
Sourcepub fn from_config(config: &EvidenceSinkConfig) -> Result<Option<Self>>
pub fn from_config(config: &EvidenceSinkConfig) -> Result<Option<Self>>
Build an evidence sink from config. Returns Ok(None) when disabled.
For file destinations the existing file size is counted toward the cap
so that restarting a process does not reset the budget. If the file
already exceeds max_bytes the sink is returned in a “capped” state
and no further bytes will be written.
Sourcepub fn write_jsonl(&self, line: &str) -> Result<()>
pub fn write_jsonl(&self, line: &str) -> Result<()>
Write a single JSONL line with newline and optional flush.
If the file size cap has been reached, the write is silently dropped
and Ok(()) is returned so callers never see an error from capping.
Trait Implementations§
Source§impl Clone for EvidenceSink
impl Clone for EvidenceSink
Source§fn clone(&self) -> EvidenceSink
fn clone(&self) -> EvidenceSink
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 moreAuto Trait Implementations§
impl Freeze for EvidenceSink
impl RefUnwindSafe for EvidenceSink
impl Send for EvidenceSink
impl Sync for EvidenceSink
impl Unpin for EvidenceSink
impl UnsafeUnpin for EvidenceSink
impl UnwindSafe for EvidenceSink
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