pub enum ForwardedHeader<H: SphinxHeaderSpec> {
Relayed {
next_header: RoutingInfo<H>,
path_pos: u8,
next_node: H::KeyId,
additional_info: H::RelayerData,
},
Final {
receiver_data: H::PacketReceiverData,
is_reply: bool,
no_ack: bool,
},
}Expand description
Enum carry information about the packet based on whether it is destined for the current node (FinalNode)
or if the packet is supposed to be only relayed (RelayNode).
Variants§
Relayed
The packet is supposed to be relayed
Fields
§
next_header: RoutingInfo<H>Transformed header
§
additional_info: H::RelayerDataAdditional data for the relayer
Final
The packet is at its final destination
Fields
§
receiver_data: H::PacketReceiverDataData from the sender to the packet receiver.
This usually contains also H::Pseudonym.
§
is_reply: boolIndicates whether this message is a reply and a ReplyOpener
should be used to further decrypt the message.
Auto Trait Implementations§
impl<H> Freeze for ForwardedHeader<H>where
<H as SphinxHeaderSpec>::KeyId: Freeze,
<H as SphinxHeaderSpec>::RelayerData: Freeze,
<H as SphinxHeaderSpec>::PacketReceiverData: Freeze,
impl<H> RefUnwindSafe for ForwardedHeader<H>where
<H as SphinxHeaderSpec>::KeyId: RefUnwindSafe,
<H as SphinxHeaderSpec>::RelayerData: RefUnwindSafe,
<H as SphinxHeaderSpec>::PacketReceiverData: RefUnwindSafe,
H: RefUnwindSafe,
impl<H> Send for ForwardedHeader<H>where
<H as SphinxHeaderSpec>::KeyId: Send,
<H as SphinxHeaderSpec>::RelayerData: Send,
<H as SphinxHeaderSpec>::PacketReceiverData: Send,
H: Send,
impl<H> Sync for ForwardedHeader<H>where
<H as SphinxHeaderSpec>::KeyId: Sync,
<H as SphinxHeaderSpec>::RelayerData: Sync,
<H as SphinxHeaderSpec>::PacketReceiverData: Sync,
H: Sync,
impl<H> Unpin for ForwardedHeader<H>where
<H as SphinxHeaderSpec>::KeyId: Unpin,
<H as SphinxHeaderSpec>::RelayerData: Unpin,
<H as SphinxHeaderSpec>::PacketReceiverData: Unpin,
H: Unpin,
impl<H> UnwindSafe for ForwardedHeader<H>where
<H as SphinxHeaderSpec>::KeyId: UnwindSafe,
<H as SphinxHeaderSpec>::RelayerData: UnwindSafe,
<H as SphinxHeaderSpec>::PacketReceiverData: UnwindSafe,
H: UnwindSafe,
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
§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