pub enum OnionCellBucket {
KiB4,
KiB16,
KiB64,
KiB256,
MiB1,
MiB4,
MiB12,
}Expand description
Public size classes used by encrypted onion cells.
The class is intentionally visible while the direction, message discriminant, and exact application length are encrypted. A small class set bounds padding overhead without exposing a byte-accurate traffic fingerprint.
Variants§
KiB4
Up to four KiB of encrypted cell plaintext.
KiB16
Up to sixteen KiB of encrypted cell plaintext.
KiB64
Up to sixty-four KiB of encrypted cell plaintext.
KiB256
Up to 256 KiB of encrypted cell plaintext.
MiB1
Up to one MiB of encrypted cell plaintext.
MiB4
Up to four MiB of encrypted cell plaintext.
MiB12
Up to twelve MiB of encrypted cell plaintext. Admission charges the full visible bucket size, irrespective of the hidden encoded length, so an undersized payload cannot bypass the relay’s per-peer or global byte budget.
Implementations§
Source§impl OnionCellBucket
impl OnionCellBucket
Sourcepub const fn plaintext_len(self) -> usize
pub const fn plaintext_len(self) -> usize
Return the fixed plaintext length protected by this cell class.
Trait Implementations§
Source§impl Clone for OnionCellBucket
impl Clone for OnionCellBucket
Source§fn clone(&self) -> OnionCellBucket
fn clone(&self) -> OnionCellBucket
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for OnionCellBucket
Source§impl Debug for OnionCellBucket
impl Debug for OnionCellBucket
Source§impl<'de> Deserialize<'de> for OnionCellBucket
impl<'de> Deserialize<'de> for OnionCellBucket
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>,
impl Eq for OnionCellBucket
Source§impl PartialEq for OnionCellBucket
impl PartialEq for OnionCellBucket
Source§impl Serialize for OnionCellBucket
impl Serialize for OnionCellBucket
impl StructuralPartialEq for OnionCellBucket
Auto Trait Implementations§
impl Freeze for OnionCellBucket
impl RefUnwindSafe for OnionCellBucket
impl Send for OnionCellBucket
impl Sync for OnionCellBucket
impl Unpin for OnionCellBucket
impl UnsafeUnpin for OnionCellBucket
impl UnwindSafe for OnionCellBucket
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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§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
key and return true if they are equal.impl<T> ErasedDestructor for Twhere
T: 'static,
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
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> ⓘ
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> ⓘ
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 moreSource§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
impl<T> MaybeSend for T
Source§impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
Source§unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
Source§fn resolve_niched(out: Place<NichedOption<T, N1>>)
fn resolve_niched(out: Place<NichedOption<T, N1>>)
out indicating that a T is niched.