pub struct StatusCache { /* private fields */ }Expand description
Per-line cache of the newest verified document, under the varve root.
Implementations§
Source§impl StatusCache
impl StatusCache
pub fn at_root(root: &Path) -> Self
Sourcepub fn update(
&self,
line: &Line,
envelope: &[u8],
parsed: &LineStatus,
) -> Result<(), LineStatusError>
pub fn update( &self, line: &Line, envelope: &[u8], parsed: &LineStatus, ) -> Result<(), LineStatusError>
Store a VERIFIED envelope for its line, refusing counter regressions.
Sourcepub fn envelope_bytes(
&self,
line: &Line,
) -> Result<Option<Vec<u8>>, LineStatusError>
pub fn envelope_bytes( &self, line: &Line, ) -> Result<Option<Vec<u8>>, LineStatusError>
The cached envelope bytes for a line, unparsed, if any.
Used by archive to carry the baseline across an air gap (varve#77).
Deliberately opaque: the caller re-attaches the bytes verbatim, and the
far side re-verifies against its own trust root — archiving must not
become a place where a document is re-signed or re-shaped.
Sourcepub fn load(
&self,
line: &Line,
root_public_key: &[u8],
) -> Result<Option<LineStatus>, LineStatusError>
pub fn load( &self, line: &Line, root_public_key: &[u8], ) -> Result<Option<LineStatus>, LineStatusError>
Load and re-verify the cached envelope for a line.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for StatusCache
impl RefUnwindSafe for StatusCache
impl Send for StatusCache
impl Sync for StatusCache
impl Unpin for StatusCache
impl UnsafeUnpin for StatusCache
impl UnwindSafe for StatusCache
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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