pub struct HashChain { /* private fields */ }Expand description
The append-only, hash-chained audit ledger of a Governed Execution Environment. Every decision (allow, deny, require-approval) is linked to the one before it, so any retrospective modification of a record breaks the chain at verify().
Implementations§
Source§impl HashChain
impl HashChain
pub fn new() -> Self
pub fn append(&mut self, record: DecisionRecord) -> u64
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn records(&self) -> Vec<DecisionRecord>
pub fn last_record(&self) -> Option<&DecisionRecord>
pub fn entries(&self) -> &[AuditEntry]
pub fn recent(&self, n: usize) -> Vec<DecisionRecord>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for HashChain
impl RefUnwindSafe for HashChain
impl Send for HashChain
impl Sync for HashChain
impl Unpin for HashChain
impl UnsafeUnpin for HashChain
impl UnwindSafe for HashChain
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