pub struct PacketParts<'a, S: SphinxSuite, H: SphinxHeaderSpec> {
pub surbs: Vec<SURB<S, H>>,
pub payload: Cow<'a, [u8]>,
pub signals: PacketSignals,
}Expand description
Individual parts of a PacketMessage: SURBs, the actual message (payload) and additional signals for the
recipient.
Fields§
§surbs: Vec<SURB<S, H>>Contains (a potentially empty) list of SURBs.
payload: Cow<'a, [u8]>Contains the actual packet payload.
signals: PacketSignalsAdditional packet signals from the sender to the recipient.
Trait Implementations§
Source§impl<S: SphinxSuite, H: SphinxHeaderSpec> Clone for PacketParts<'_, S, H>
impl<S: SphinxSuite, H: SphinxHeaderSpec> Clone for PacketParts<'_, S, H>
Source§impl<S: SphinxSuite, H: SphinxHeaderSpec> Debug for PacketParts<'_, S, H>
impl<S: SphinxSuite, H: SphinxHeaderSpec> Debug for PacketParts<'_, S, H>
Source§impl<S: SphinxSuite, H: SphinxHeaderSpec> PartialEq for PacketParts<'_, S, H>
impl<S: SphinxSuite, H: SphinxHeaderSpec> PartialEq for PacketParts<'_, S, H>
Source§impl<S: SphinxSuite, H: SphinxHeaderSpec, const P: usize> TryFrom<PacketMessage<S, H, P>> for PacketParts<'_, S, H>
impl<S: SphinxSuite, H: SphinxHeaderSpec, const P: usize> TryFrom<PacketMessage<S, H, P>> for PacketParts<'_, S, H>
Source§type Error = SphinxError
type Error = SphinxError
The type returned in the event of a conversion error.
Source§impl<S: SphinxSuite, H: SphinxHeaderSpec, const P: usize> TryFrom<PacketParts<'_, S, H>> for PacketMessage<S, H, P>
impl<S: SphinxSuite, H: SphinxHeaderSpec, const P: usize> TryFrom<PacketParts<'_, S, H>> for PacketMessage<S, H, P>
Source§type Error = SphinxError
type Error = SphinxError
The type returned in the event of a conversion error.
impl<S: SphinxSuite, H: SphinxHeaderSpec> Eq for PacketParts<'_, S, H>
Auto Trait Implementations§
impl<'a, S, H> Freeze for PacketParts<'a, S, H>
impl<'a, S, H> RefUnwindSafe for PacketParts<'a, S, H>where
<H as SphinxHeaderSpec>::KeyId: RefUnwindSafe,
<H as SphinxHeaderSpec>::SurbReceiverData: RefUnwindSafe,
<<<S as SphinxSuite>::G as GroupElement<<S as SphinxSuite>::E>>::AlphaLen as ArrayLength>::ArrayType<u8>: RefUnwindSafe,
H: RefUnwindSafe,
impl<'a, S, H> Send for PacketParts<'a, S, H>where
<H as SphinxHeaderSpec>::KeyId: Send,
<H as SphinxHeaderSpec>::SurbReceiverData: Send,
H: Send,
impl<'a, S, H> Sync for PacketParts<'a, S, H>where
<H as SphinxHeaderSpec>::KeyId: Sync,
<H as SphinxHeaderSpec>::SurbReceiverData: Sync,
H: Sync,
impl<'a, S, H> Unpin for PacketParts<'a, S, H>where
<H as SphinxHeaderSpec>::KeyId: Unpin,
<H as SphinxHeaderSpec>::SurbReceiverData: Unpin,
<<<S as SphinxSuite>::G as GroupElement<<S as SphinxSuite>::E>>::AlphaLen as ArrayLength>::ArrayType<u8>: Unpin,
H: Unpin,
impl<'a, S, H> UnwindSafe for PacketParts<'a, S, H>where
<H as SphinxHeaderSpec>::KeyId: UnwindSafe,
<H as SphinxHeaderSpec>::SurbReceiverData: UnwindSafe,
<<<S as SphinxSuite>::G as GroupElement<<S as SphinxSuite>::E>>::AlphaLen as ArrayLength>::ArrayType<u8>: 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
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> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
§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