#[repr(u8)]pub enum TicketTypeRepr {
V1MixnetEntry = 0,
V1MixnetExit = 1,
V1WireguardEntry = 2,
V1WireguardExit = 3,
}Expand description
This type is defined mostly for the purposes of having constants (like sizes) associated with given variants It’s not meant to be serialised or have any fancy traits defined on it (in this crate)
Variants§
Implementations§
Source§impl TicketTypeRepr
impl TicketTypeRepr
pub const WIREGUARD_ENTRY_TICKET_SIZE: u64
pub const WIREGUARD_EXIT_TICKET_SIZE: u64
pub const MIXNET_ENTRY_TICKET_SIZE: u64
pub const MIXNET_EXIT_TICKET_SIZE: u64
Sourcepub const fn bandwidth_value(&self) -> u64
pub const fn bandwidth_value(&self) -> u64
How much bandwidth (in bytes) one ticket can grant
Trait Implementations§
Source§impl Clone for TicketTypeRepr
impl Clone for TicketTypeRepr
Source§fn clone(&self) -> TicketTypeRepr
fn clone(&self) -> TicketTypeRepr
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 TicketTypeRepr
impl Debug for TicketTypeRepr
Source§impl From<TicketType> for TicketTypeRepr
impl From<TicketType> for TicketTypeRepr
Source§fn from(value: TicketType) -> Self
fn from(value: TicketType) -> Self
Converts to this type from the input type.
Source§impl From<TicketTypeRepr> for TicketType
impl From<TicketTypeRepr> for TicketType
Source§fn from(value: TicketTypeRepr) -> Self
fn from(value: TicketTypeRepr) -> Self
Converts to this type from the input type.
Source§impl PartialEq for TicketTypeRepr
impl PartialEq for TicketTypeRepr
impl Copy for TicketTypeRepr
impl StructuralPartialEq for TicketTypeRepr
Auto Trait Implementations§
impl Freeze for TicketTypeRepr
impl RefUnwindSafe for TicketTypeRepr
impl Send for TicketTypeRepr
impl Sync for TicketTypeRepr
impl Unpin for TicketTypeRepr
impl UnwindSafe for TicketTypeRepr
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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