pub struct VerificationCache { /* private fields */ }
Implementations§
Source§impl VerificationCache
impl VerificationCache
pub fn new() -> Result<Self>
pub fn open<P: AsRef<Path>>(path: P) -> Result<Self>
Sourcepub fn contains(&mut self, policy: &[u8], commit: Oid) -> Result<bool>
pub fn contains(&mut self, policy: &[u8], commit: Oid) -> Result<bool>
Returns whether (policy, commit id) is in the cache.
If (policy, commit id) is in the cache, then it was previously determined that the policy authenticated the commit.
Sourcepub fn insert(&mut self, policy: &[u8], commit: Oid) -> Result<()>
pub fn insert(&mut self, policy: &[u8], commit: Oid) -> Result<()>
Add (policy, commit id) to the cache.
If (policy, commit id) is in the cache, this means that the policy considers the commit to be authenticated. Normally, the policy comes from the parent commit, but it may be a shadow policy.
pub fn persist(&mut self) -> Result<()>
Auto Trait Implementations§
impl Freeze for VerificationCache
impl !RefUnwindSafe for VerificationCache
impl Send for VerificationCache
impl Sync for VerificationCache
impl Unpin for VerificationCache
impl !UnwindSafe for VerificationCache
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