pub struct UnacknowledgedTicket {
pub ticket: VerifiedTicket,
/* private fields */
}Expand description
Represents a VerifiedTicket with an unknown other part of the [HalfKey].
Once the other [HalfKey] is known (forming a [Response]),
it can be acknowledged.
Fields§
§ticket: VerifiedTicketImplementations§
Source§impl UnacknowledgedTicket
impl UnacknowledgedTicket
Sourcepub fn verified_ticket(&self) -> &Ticket
pub fn verified_ticket(&self) -> &Ticket
Convenience method to retrieve a reference to the underlying verified Ticket.
Sourcepub fn acknowledge(
self,
acknowledgement: &HalfKey,
) -> Result<AcknowledgedTicket>
pub fn acknowledge( self, acknowledgement: &HalfKey, ) -> Result<AcknowledgedTicket>
Verifies that the given acknowledgement solves this ticket’s challenge and then turns this unacknowledged ticket into an acknowledged ticket by adding the received acknowledgement of the forwarded packet.
Trait Implementations§
Source§impl Clone for UnacknowledgedTicket
impl Clone for UnacknowledgedTicket
Source§fn clone(&self) -> UnacknowledgedTicket
fn clone(&self) -> UnacknowledgedTicket
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 UnacknowledgedTicket
impl Debug for UnacknowledgedTicket
Source§impl<'de> Deserialize<'de> for UnacknowledgedTicket
impl<'de> Deserialize<'de> for UnacknowledgedTicket
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for UnacknowledgedTicket
impl Display for UnacknowledgedTicket
Source§impl PartialEq for UnacknowledgedTicket
impl PartialEq for UnacknowledgedTicket
Source§impl Serialize for UnacknowledgedTicket
impl Serialize for UnacknowledgedTicket
impl Copy for UnacknowledgedTicket
impl Eq for UnacknowledgedTicket
impl StructuralPartialEq for UnacknowledgedTicket
Auto Trait Implementations§
impl Freeze for UnacknowledgedTicket
impl RefUnwindSafe for UnacknowledgedTicket
impl Send for UnacknowledgedTicket
impl Sync for UnacknowledgedTicket
impl Unpin for UnacknowledgedTicket
impl UnwindSafe for UnacknowledgedTicket
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<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