pub struct RoutingInfo<H: SphinxHeaderSpec>(Box<[u8]>, PhantomData<H>);Expand description
Carries routing information for the mixnet packet.
Tuple Fields§
§0: Box<[u8]>§1: PhantomData<H>Implementations§
Source§impl<H: SphinxHeaderSpec> RoutingInfo<H>
impl<H: SphinxHeaderSpec> RoutingInfo<H>
Sourcepub fn new(
path: &[H::KeyId],
secrets: &[SharedSecret],
additional_data_relayer: &[H::RelayerData],
receiver_data: &H::PacketReceiverData,
is_reply: bool,
no_ack: bool,
) -> Result<Self>
pub fn new( path: &[H::KeyId], secrets: &[SharedSecret], additional_data_relayer: &[H::RelayerData], receiver_data: &H::PacketReceiverData, is_reply: bool, no_ack: bool, ) -> Result<Self>
Creates the routing information of the mixnet packet.
§Arguments
pathIDs of the nodes along the path (usually its public key or public key identifier).secretsshared secrets with the nodes along the pathadditional_data_relayeradditional data for each relayerreceiver_datadata for the packet receiver (this usually contains alsoH::Pseudonym).is_replyflag indicating whether this is a reply packetno_ackspecial flag used for acknowledgement signaling to the recipient
fn mac(&self) -> &[u8] ⓘ
fn routing_mut(&mut self) -> &mut [u8] ⓘ
fn mac_mut(&mut self) -> &mut [u8] ⓘ
Trait Implementations§
Source§impl<H: SphinxHeaderSpec> AsRef<[u8]> for RoutingInfo<H>
impl<H: SphinxHeaderSpec> AsRef<[u8]> for RoutingInfo<H>
Source§impl<H: SphinxHeaderSpec> BytesRepresentable for RoutingInfo<H>
impl<H: SphinxHeaderSpec> BytesRepresentable for RoutingInfo<H>
Source§impl<H: SphinxHeaderSpec> Clone for RoutingInfo<H>
impl<H: SphinxHeaderSpec> Clone for RoutingInfo<H>
Source§impl<H: SphinxHeaderSpec> Debug for RoutingInfo<H>
impl<H: SphinxHeaderSpec> Debug for RoutingInfo<H>
Source§impl<H: SphinxHeaderSpec> Default for RoutingInfo<H>
impl<H: SphinxHeaderSpec> Default for RoutingInfo<H>
Source§impl<'de, H: SphinxHeaderSpec> Deserialize<'de> for RoutingInfo<H>
impl<'de, H: SphinxHeaderSpec> Deserialize<'de> for RoutingInfo<H>
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<H: SphinxHeaderSpec> PartialEq for RoutingInfo<H>
impl<H: SphinxHeaderSpec> PartialEq for RoutingInfo<H>
Source§impl<H: SphinxHeaderSpec> Serialize for RoutingInfo<H>
impl<H: SphinxHeaderSpec> Serialize for RoutingInfo<H>
Source§impl<'a, H: SphinxHeaderSpec> TryFrom<&'a [u8]> for RoutingInfo<H>
impl<'a, H: SphinxHeaderSpec> TryFrom<&'a [u8]> for RoutingInfo<H>
impl<H: SphinxHeaderSpec> Eq for RoutingInfo<H>
Auto Trait Implementations§
impl<H> Freeze for RoutingInfo<H>
impl<H> RefUnwindSafe for RoutingInfo<H>where
H: RefUnwindSafe,
impl<H> Send for RoutingInfo<H>where
H: Send,
impl<H> Sync for RoutingInfo<H>where
H: Sync,
impl<H> Unpin for RoutingInfo<H>where
H: Unpin,
impl<H> UnwindSafe for RoutingInfo<H>where
H: UnwindSafe,
Blanket Implementations§
§impl<T> ToHex for T
impl<T> ToHex for T
§fn encode_hex<U>(&self) -> Uwhere
U: FromIterator<char>,
fn encode_hex<U>(&self) -> Uwhere
U: FromIterator<char>,
👎Deprecated: use
ToHexExt insteadEncode the hex strict representing
self into the result.
Lower case letters are used (e.g. f9b4ca).§fn encode_hex_upper<U>(&self) -> Uwhere
U: FromIterator<char>,
fn encode_hex_upper<U>(&self) -> Uwhere
U: FromIterator<char>,
👎Deprecated: use
ToHexExt insteadEncode the hex strict representing
self into the result.
Upper case letters are used (e.g. F9B4CA).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,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. 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§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§impl<T> ToHex for Twhere
T: BytesRepresentable,
impl<T> ToHex for Twhere
T: BytesRepresentable,
Source§impl<T> ToHex for T
impl<T> ToHex for T
Source§fn encode_hex<U>(&self) -> Uwhere
U: FromIterator<char>,
fn encode_hex<U>(&self) -> Uwhere
U: FromIterator<char>,
Encode the hex strict representing
self into the result. Lower case
letters are used (e.g. f9b4ca)Source§fn encode_hex_upper<U>(&self) -> Uwhere
U: FromIterator<char>,
fn encode_hex_upper<U>(&self) -> Uwhere
U: FromIterator<char>,
Encode the hex strict representing
self into the result. Upper case
letters are used (e.g. F9B4CA)§impl<T> ToHexExt for T
impl<T> ToHexExt for T
§fn encode_hex(&self) -> String
fn encode_hex(&self) -> String
Encode the hex strict representing
self into the result.
Lower case letters are used (e.g. f9b4ca).§fn encode_hex_upper(&self) -> String
fn encode_hex_upper(&self) -> String
Encode the hex strict representing
self into the result.
Upper case letters are used (e.g. F9B4CA).§fn encode_hex_with_prefix(&self) -> String
fn encode_hex_with_prefix(&self) -> String
Encode the hex strict representing
self into the result with prefix 0x.
Lower case letters are used (e.g. 0xf9b4ca).§fn encode_hex_upper_with_prefix(&self) -> String
fn encode_hex_upper_with_prefix(&self) -> String
Encode the hex strict representing
self into the result with prefix 0X.
Upper case letters are used (e.g. 0xF9B4CA).