pub struct ProofAuthentication {
pub key_id: Vec<u8>,
pub context: Vec<u8>,
pub issued_at_millis: Option<u64>,
pub expires_at_millis: Option<u64>,
pub nonce: Vec<u8>,
}Expand description
Metadata attached when authenticating a snapshot proof bundle.
Fields§
§key_id: Vec<u8>Application key identifier used to select the verification secret.
context: Vec<u8>Application-specific domain separation bytes.
issued_at_millis: Option<u64>Optional envelope issue time.
expires_at_millis: Option<u64>Optional envelope expiration time.
nonce: Vec<u8>Optional replay-prevention nonce.
Implementations§
Source§impl ProofAuthentication
impl ProofAuthentication
Sourcepub fn new(key_id: impl Into<Vec<u8>>) -> Self
pub fn new(key_id: impl Into<Vec<u8>>) -> Self
Start proof authentication metadata for one verification key.
Sourcepub fn with_context(self, context: impl Into<Vec<u8>>) -> Self
pub fn with_context(self, context: impl Into<Vec<u8>>) -> Self
Set application-specific domain separation bytes.
Sourcepub fn with_validity(
self,
issued_at_millis: Option<u64>,
expires_at_millis: Option<u64>,
) -> Self
pub fn with_validity( self, issued_at_millis: Option<u64>, expires_at_millis: Option<u64>, ) -> Self
Set optional issue and expiration times.
Sourcepub fn with_nonce(self, nonce: impl Into<Vec<u8>>) -> Self
pub fn with_nonce(self, nonce: impl Into<Vec<u8>>) -> Self
Set replay-prevention nonce bytes.
Trait Implementations§
Source§impl Clone for ProofAuthentication
impl Clone for ProofAuthentication
Source§fn clone(&self) -> ProofAuthentication
fn clone(&self) -> ProofAuthentication
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ProofAuthentication
impl Debug for ProofAuthentication
Source§impl Default for ProofAuthentication
impl Default for ProofAuthentication
Source§fn default() -> ProofAuthentication
fn default() -> ProofAuthentication
Returns the “default value” for a type. Read more
impl Eq for ProofAuthentication
Source§impl PartialEq for ProofAuthentication
impl PartialEq for ProofAuthentication
impl StructuralPartialEq for ProofAuthentication
Auto Trait Implementations§
impl Freeze for ProofAuthentication
impl RefUnwindSafe for ProofAuthentication
impl Send for ProofAuthentication
impl Sync for ProofAuthentication
impl Unpin for ProofAuthentication
impl UnsafeUnpin for ProofAuthentication
impl UnwindSafe for ProofAuthentication
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
Converts
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>
Converts
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