pub struct WitnessLog<'a> { /* private fields */ }Expand description
Witness Log for cryptographically-linked audit trail
Provides immutable entries, hash-chain linking, and semantic searchability.
Implementations§
Source§impl<'a> WitnessLog<'a>
impl<'a> WitnessLog<'a>
Sourcepub fn append(
&self,
agent_id: &str,
action_type: &str,
details: &str,
) -> Result<String>
pub fn append( &self, agent_id: &str, action_type: &str, details: &str, ) -> Result<String>
Append an entry to the witness log (immutable, hash-linked)
Sourcepub fn search(&self, query: &str, k: usize) -> Result<Vec<WitnessEntry>>
pub fn search(&self, query: &str, k: usize) -> Result<Vec<WitnessEntry>>
Search witness log semantically
Sourcepub fn get_by_agent(
&self,
agent_id: &str,
k: usize,
) -> Result<Vec<WitnessEntry>>
pub fn get_by_agent( &self, agent_id: &str, k: usize, ) -> Result<Vec<WitnessEntry>>
Get entries by agent ID
Sourcepub fn verify_chain(&self) -> Result<bool>
pub fn verify_chain(&self) -> Result<bool>
Verify hash chain integrity
Auto Trait Implementations§
impl<'a> !Freeze for WitnessLog<'a>
impl<'a> !RefUnwindSafe for WitnessLog<'a>
impl<'a> Send for WitnessLog<'a>
impl<'a> Sync for WitnessLog<'a>
impl<'a> Unpin for WitnessLog<'a>
impl<'a> !UnwindSafe for WitnessLog<'a>
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
Converts
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>
Converts
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