pub struct Hop<Payload: SphinxPayload> {
pub node_id: PublicKey,
pub payload: Payload,
}
Expand description
Sphinx hop information
Fields
node_id: PublicKey
Public key of the hop node
payload: Payload
Payload data specific for that node
Implementations
sourceimpl<Payload> Hop<Payload> where
Payload: SphinxPayload,
impl<Payload> Hop<Payload> where
Payload: SphinxPayload,
Trait Implementations
sourceimpl<Payload: Clone + SphinxPayload> Clone for Hop<Payload>
impl<Payload: Clone + SphinxPayload> Clone for Hop<Payload>
sourceimpl<Payload: Debug + SphinxPayload> Debug for Hop<Payload>
impl<Payload: Debug + SphinxPayload> Debug for Hop<Payload>
sourceimpl<Payload: Hash + SphinxPayload> Hash for Hop<Payload>
impl<Payload: Hash + SphinxPayload> Hash for Hop<Payload>
sourceimpl<Payload: SphinxPayload> LightningDecode for Hop<Payload>
impl<Payload: SphinxPayload> LightningDecode for Hop<Payload>
sourcefn lightning_decode<D: Read>(d: D) -> Result<Self, Error>
fn lightning_decode<D: Read>(d: D) -> Result<Self, Error>
Decode with the given std::io::Read
instance; must either
construct an instance or return implementation-specific error type. Read more
sourcefn lightning_deserialize(data: impl AsRef<[u8]>) -> Result<Self, Error>
fn lightning_deserialize(data: impl AsRef<[u8]>) -> Result<Self, Error>
Tries to deserialize byte array into the current type using
LightningDecode::lightning_decode
function. Read more
sourceimpl<Payload: SphinxPayload> LightningEncode for Hop<Payload>
impl<Payload: SphinxPayload> LightningEncode for Hop<Payload>
sourcefn lightning_encode<E: Write>(&self, e: E) -> Result<usize, Error>
fn lightning_encode<E: Write>(&self, e: E) -> Result<usize, Error>
Encode with the given std::io::Write
instance; must return result
with either amount of bytes encoded – or implementation-specific
error type. Read more
sourcefn lightning_serialize(&self) -> Result<Vec<u8, Global>, Error>
fn lightning_serialize(&self) -> Result<Vec<u8, Global>, Error>
Serializes data as a byte array using
LightningEncode::lightning_encode
function. Read more
sourceimpl<Payload: SphinxPayload> StrictDecode for Hop<Payload>
impl<Payload: SphinxPayload> StrictDecode for Hop<Payload>
sourcefn strict_decode<D: Read>(d: D) -> Result<Self, Error>
fn strict_decode<D: Read>(d: D) -> Result<Self, Error>
Decode with the given std::io::Read
instance; must either
construct an instance or return implementation-specific error type. Read more
sourcefn strict_deserialize(data: impl AsRef<[u8]>) -> Result<Self, Error>
fn strict_deserialize(data: impl AsRef<[u8]>) -> Result<Self, Error>
Tries to deserialize byte array into the current type using
StrictDecode::strict_decode
Read more
sourceimpl<Payload: SphinxPayload> StrictEncode for Hop<Payload>
impl<Payload: SphinxPayload> StrictEncode for Hop<Payload>
sourcefn strict_encode<E: Write>(&self, e: E) -> Result<usize, Error>
fn strict_encode<E: Write>(&self, e: E) -> Result<usize, Error>
Encode with the given std::io::Write
instance; must return result
with either amount of bytes encoded – or implementation-specific
error type. Read more
sourcefn strict_serialize(&self) -> Result<Vec<u8, Global>, Error>
fn strict_serialize(&self) -> Result<Vec<u8, Global>, Error>
Serializes data as a byte array using StrictEncode::strict_encode
function Read more
impl<Payload: Eq + SphinxPayload> Eq for Hop<Payload>
impl<Payload: SphinxPayload> StructuralEq for Hop<Payload>
impl<Payload: SphinxPayload> StructuralPartialEq for Hop<Payload>
Auto Trait Implementations
impl<Payload> RefUnwindSafe for Hop<Payload> where
Payload: RefUnwindSafe,
impl<Payload> Send for Hop<Payload> where
Payload: Send,
impl<Payload> Sync for Hop<Payload> where
Payload: Sync,
impl<Payload> Unpin for Hop<Payload> where
Payload: Unpin,
impl<Payload> UnwindSafe for Hop<Payload> where
Payload: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more