pub struct Mailbox { /* private fields */ }Expand description
Eight-slot pending encrypted mailbox.
Implementations§
Source§impl Mailbox
impl Mailbox
Sourcepub fn get(&self, slot: usize) -> Result<MailboxSlot, QdnfError>
pub fn get(&self, slot: usize) -> Result<MailboxSlot, QdnfError>
Fetches an entry by key; None when absent.
Sourcepub fn store(
&mut self,
ct: &[u8],
recipient: StrongDigest,
key_generation: u64,
) -> Result<usize, QdnfError>
pub fn store( &mut self, ct: &[u8], recipient: StrongDigest, key_generation: u64, ) -> Result<usize, QdnfError>
Copy ciphertext bytes into a Stored slot. Length/digest without bytes is rejected.
Sourcepub fn store_len_digest(
&mut self,
ciphertext_len: u32,
ciphertext_digest: StrongDigest,
recipient: StrongDigest,
key_generation: u64,
) -> Result<usize, QdnfError>
pub fn store_len_digest( &mut self, ciphertext_len: u32, ciphertext_digest: StrongDigest, recipient: StrongDigest, key_generation: u64, ) -> Result<usize, QdnfError>
Length + digest is not content. Never becomes Stored.
Sourcepub fn revoke_clinician(
&mut self,
clinician: StrongDigest,
) -> Result<(), QdnfError>
pub fn revoke_clinician( &mut self, clinician: StrongDigest, ) -> Result<(), QdnfError>
Revoke clinician grants. Pending slots stay Stored.
Sourcepub fn deliver(
&mut self,
slot: usize,
recipient: StrongDigest,
key_generation: u64,
) -> Result<(), QdnfError>
pub fn deliver( &mut self, slot: usize, recipient: StrongDigest, key_generation: u64, ) -> Result<(), QdnfError>
Deliver Stored material to the recorded recipient. No substitution. Transport delivery does not mark ClinicianReviewed or ApplicationAcked.
Sourcepub fn deliver_live(
&mut self,
slot: usize,
recipient: StrongDigest,
live: LiveGenerations,
) -> Result<(), QdnfError>
pub fn deliver_live( &mut self, slot: usize, recipient: StrongDigest, live: LiveGenerations, ) -> Result<(), QdnfError>
Commit/release recheck using live source/policy/identity generations (E12.5).
Sourcepub fn store_bound(
&mut self,
ct: &[u8],
recipient: StrongDigest,
bound: BoundGenerations,
) -> Result<usize, QdnfError>
pub fn store_bound( &mut self, ct: &[u8], recipient: StrongDigest, bound: BoundGenerations, ) -> Result<usize, QdnfError>
Store ciphertext bound to compiled source/policy/identity generations.
Sourcepub fn mark_application_acked(&mut self, slot: usize) -> Result<(), QdnfError>
pub fn mark_application_acked(&mut self, slot: usize) -> Result<(), QdnfError>
Application acknowledgement. Requires transport Delivered. Distinct from ClinicianReviewed.
Sourcepub fn mark_reviewed(&mut self, slot: usize) -> Result<(), QdnfError>
pub fn mark_reviewed(&mut self, slot: usize) -> Result<(), QdnfError>
ClinicianReviewed requires Delivered. Stored cannot skip. Network delivery never calls this.
Sourcepub fn substitute_recipient(
&mut self,
slot: usize,
new_recipient: StrongDigest,
) -> Result<(), QdnfError>
pub fn substitute_recipient( &mut self, slot: usize, new_recipient: StrongDigest, ) -> Result<(), QdnfError>
Unapproved recipient substitution is always Unauthorized.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Mailbox
impl RefUnwindSafe for Mailbox
impl Send for Mailbox
impl Sync for Mailbox
impl Unpin for Mailbox
impl UnsafeUnpin for Mailbox
impl UnwindSafe for Mailbox
Blanket Implementations§
§impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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> ⓘ
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> ⓘ
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