pub struct OnionLoop<P, T = P> { /* private fields */ }Expand description
A loop whose relay positions carry a label P and whose symbol positions carry a label T,
the guard’s label stored once.
The fields follow the unfold grammar of the module documentation: lead holds the relays
after the guard, stages each intermediate symbol with the relays after it, terminal the
last symbol hₙ, and tail the relays before the closing guard. The guard and the terminal
are total, and the shape is derived from stages. The segment lengths s − 1, s, s − 1
are established by OnionLoop::try_unfold, the only constructor.
Implementations§
Source§impl<P, T> OnionLoop<P, T>
impl<P, T> OnionLoop<P, T>
Sourcepub fn shape(&self) -> OnionLoopShape
pub fn shape(&self) -> OnionLoopShape
Return the shape of this loop: n = |stages| + 1 symbols, bounded by construction.
Sourcepub fn forward_prefix(&self) -> impl Iterator<Item = &P>
pub fn forward_prefix(&self) -> impl Iterator<Item = &P>
Return the labels of the relay positions before h₁: the guard, then r₀,₂ … r₀,ₛ.
Source§impl<P> OnionLoop<P>
impl<P> OnionLoop<P>
Sourcepub fn open_path(&self) -> impl Iterator<Item = &P>
pub fn open_path(&self) -> impl Iterator<Item = &P>
Return the labels of the open path 1 … H − 1, the guard once: the H − 1 hops a route
requires pairwise distinct.
Sourcepub fn positions(&self) -> impl Iterator<Item = &P>
pub fn positions(&self) -> impl Iterator<Item = &P>
Return the labels of all H positions in order, the guard at 1 and H.
Sourcepub fn roles(&self) -> impl Iterator<Item = (OnionLoopRole, &P)>
pub fn roles(&self) -> impl Iterator<Item = (OnionLoopRole, &P)>
Return every position 1 … H in order with its role: the relay positions, the guard at
1 and H included, and each symbol hop hₖ with its index k (1 ≤ k ≤ n).
Law: the projection to labels is Self::positions, and the roles read
Relay^s · Π_{k=1..n} (Symbol k · Relay^s), the unfold grammar with the guard counted in
both end segments.
Sourcepub fn return_path(&self) -> impl Iterator<Item = &P>
pub fn return_path(&self) -> impl Iterator<Item = &P>
Return the return path: the positions after the terminal hₙ, rₙ,₁ … rₙ,ₛ = g, which a
reply block of hₙ travels.
Trait Implementations§
impl<P: Eq, T: Eq> Eq for OnionLoop<P, T>
impl<P: PartialEq, T: PartialEq> StructuralPartialEq for OnionLoop<P, T>
Auto Trait Implementations§
impl<P, T> Forget for OnionLoop<P, T>
impl<P, T> Freeze for OnionLoop<P, T>
impl<P, T> Move for OnionLoop<P, T>
impl<P, T> RefUnwindSafe for OnionLoop<P, T>
impl<P, T> Send for OnionLoop<P, T>
impl<P, T> Sync for OnionLoop<P, T>
impl<P, T> Unpin for OnionLoop<P, T>
impl<P, T> UnsafeUnpin for OnionLoop<P, T>
impl<P, T> UnwindSafe for OnionLoop<P, T>
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,
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
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
impl<T> MaybeSendSync 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.