pub struct PersistentNonceStore { /* private fields */ }Expand description
Fjall-backed (or vsock-backed) persistent nonce store. Any
KeyspaceHandle will do. The bundle_id lives in the (plaintext)
key; encrypted deployments now also encrypt the row value, binding it
to its (keyspace, key) location via AAD so a hostile store operator
cannot relocate or substitute a nonce record (P0.1). Anti-rollback of
the whole keyspace is a separate concern (P0.2).
Implementations§
Source§impl PersistentNonceStore
impl PersistentNonceStore
pub fn new(ks: KeyspaceHandle) -> Self
Trait Implementations§
Source§impl NonceStore for PersistentNonceStore
impl NonceStore for PersistentNonceStore
Source§fn check_and_record<'a>(
&'a self,
bundle_id: &'a [u8; 16],
) -> Pin<Box<dyn Future<Output = Result<(), SealedTransferError>> + Send + 'a>>
fn check_and_record<'a>( &'a self, bundle_id: &'a [u8; 16], ) -> Pin<Box<dyn Future<Output = Result<(), SealedTransferError>> + Send + 'a>>
Atomically check-and-insert. Returns
Ok(()) on first use,
SealedTransferError::NonceReplay if the bundle_id has been seen.Auto Trait Implementations§
impl !Freeze for PersistentNonceStore
impl !RefUnwindSafe for PersistentNonceStore
impl !UnwindSafe for PersistentNonceStore
impl Send for PersistentNonceStore
impl Sync for PersistentNonceStore
impl Unpin for PersistentNonceStore
impl UnsafeUnpin for PersistentNonceStore
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> BorrowUnordered for T
impl<T> BorrowUnordered for T
fn as_unordered(&self) -> &Unordered<T>
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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, U, C> IntoWithContext<U, C> for Twhere
U: FromWithContext<T, C>,
impl<T, U, C> IntoWithContext<U, C> for Twhere
U: FromWithContext<T, C>,
Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<T> ResourceProvider<()> for T
impl<T> ResourceProvider<()> for T
Source§fn get_resource(&self) -> &()
fn get_resource(&self) -> &()
Returns a reference to the resource of type
T.