pub struct InvitationTicket { /* private fields */ }Expand description
An encrypted offline invitation envelope safe to store without its bearer secret.
Implementations§
Source§impl InvitationTicket
impl InvitationTicket
Sourcepub fn open(
&self,
secret: &InvitationSecret,
local_subject: AuthorId,
) -> Result<Invitation, InvitationError>
pub fn open( &self, secret: &InvitationSecret, local_subject: AuthorId, ) -> Result<Invitation, InvitationError>
Decrypts and validates a ticket for exactly the local endpoint identity.
Sourcepub fn encode_canonical(&self) -> Result<Vec<u8>, InvitationError>
pub fn encode_canonical(&self) -> Result<Vec<u8>, InvitationError>
Strictly encodes the opaque ticket.
Sourcepub fn id(&self) -> Result<[u8; 32], InvitationError>
pub fn id(&self) -> Result<[u8; 32], InvitationError>
Returns the content identifier used for durable one-time import consumption.
Sourcepub fn decode_canonical(
bytes: &[u8],
) -> Result<InvitationTicket, InvitationError>
pub fn decode_canonical( bytes: &[u8], ) -> Result<InvitationTicket, InvitationError>
Strictly decodes an opaque ticket without attempting decryption.
Trait Implementations§
Source§impl Clone for InvitationTicket
impl Clone for InvitationTicket
Source§fn clone(&self) -> InvitationTicket
fn clone(&self) -> InvitationTicket
Returns a duplicate of the value. Read more
1.0.0 · 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 InvitationTicket
impl Debug for InvitationTicket
Source§impl PartialEq for InvitationTicket
impl PartialEq for InvitationTicket
impl Eq for InvitationTicket
impl StructuralPartialEq for InvitationTicket
Auto Trait Implementations§
impl Freeze for InvitationTicket
impl RefUnwindSafe for InvitationTicket
impl Send for InvitationTicket
impl Sync for InvitationTicket
impl Unpin for InvitationTicket
impl UnwindSafe for InvitationTicket
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,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> 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>
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