pub struct HoprIncomingPacket {
pub packet_tag: PacketTag,
pub ack_key: Option<HalfKey>,
pub previous_hop: OffchainPublicKey,
pub plain_text: Box<[u8]>,
pub sender: HoprPseudonym,
pub surbs: Vec<(HoprSurbId, HoprSurb)>,
pub signals: PacketSignals,
}Expand description
Represents a packet incoming to its final destination.
Fields§
§packet_tag: PacketTagPacket’s authentication tag.
ack_key: Option<HalfKey>Acknowledgement to be sent to the previous hop.
In case an acknowledgement is not required, this field is None. This arises specifically
in case the message payload is used to send one or more acknowledgements in the payload.
previous_hop: OffchainPublicKeyAddress of the previous hop.
plain_text: Box<[u8]>Decrypted packet payload.
sender: HoprPseudonymPseudonym of the packet creator.
surbs: Vec<(HoprSurbId, HoprSurb)>List of SURBs to be used for replies sent to the packet creator.
signals: PacketSignalsAdditional packet signals from the lower protocol layer passed from the packet sender.
Zero if no signal flags were specified.
Trait Implementations§
Source§impl Clone for HoprIncomingPacket
impl Clone for HoprIncomingPacket
Source§fn clone(&self) -> HoprIncomingPacket
fn clone(&self) -> HoprIncomingPacket
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for HoprIncomingPacket
impl RefUnwindSafe for HoprIncomingPacket
impl Send for HoprIncomingPacket
impl Sync for HoprIncomingPacket
impl Unpin for HoprIncomingPacket
impl UnwindSafe for HoprIncomingPacket
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<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