pub struct VerifiedRelayTicket {
pub nonce: String,
pub valid_until: i64,
}Expand description
What a verified ticket tells its verifier: the nonce to record as spent and the last second at which the ticket could still have verified.
Fields§
§nonce: String§valid_until: i64Implementations§
Source§impl VerifiedRelayTicket
impl VerifiedRelayTicket
Sourcepub fn spend(
&self,
cache: &NonceCache,
now: i64,
) -> Result<(), RelayTicketError>
pub fn spend( &self, cache: &NonceCache, now: i64, ) -> Result<(), RelayTicketError>
Spend the nonce in cache. A second use of the same ticket is
RelayTicketError::Replayed.
Trait Implementations§
Source§impl Clone for VerifiedRelayTicket
impl Clone for VerifiedRelayTicket
Source§impl Debug for VerifiedRelayTicket
impl Debug for VerifiedRelayTicket
impl Eq for VerifiedRelayTicket
Source§impl PartialEq for VerifiedRelayTicket
impl PartialEq for VerifiedRelayTicket
impl StructuralPartialEq for VerifiedRelayTicket
Auto Trait Implementations§
impl Freeze for VerifiedRelayTicket
impl RefUnwindSafe for VerifiedRelayTicket
impl Send for VerifiedRelayTicket
impl Sync for VerifiedRelayTicket
impl Unpin for VerifiedRelayTicket
impl UnsafeUnpin for VerifiedRelayTicket
impl UnwindSafe for VerifiedRelayTicket
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.