pub struct SphinxPacket {
pub header: SphinxHeader,
pub payload: Payload,
}Fields§
§header: SphinxHeader§payload: PayloadImplementations§
Source§impl SphinxPacket
impl SphinxPacket
pub fn new( message: Vec<u8>, route: &[Node], destination: &Destination, delays: &[Delay], ) -> Result<SphinxPacket>
pub fn len(&self) -> usize
Sourcepub fn process_with_expanded_secret(
self,
expanded_shared_secret: &ExpandedSharedSecret,
) -> Result<ProcessedPacket>
pub fn process_with_expanded_secret( self, expanded_shared_secret: &ExpandedSharedSecret, ) -> Result<ProcessedPacket>
Processes the packet with the provided expanded secret. It could be useful in the situation where caller has already derived the value, because, for example, he had to obtain the reply tag.
pub fn process(self, node_secret_key: &StaticSecret) -> Result<ProcessedPacket>
pub fn to_bytes(&self) -> Vec<u8> ⓘ
pub fn from_bytes(bytes: &[u8]) -> Result<Self>
Auto Trait Implementations§
impl Freeze for SphinxPacket
impl RefUnwindSafe for SphinxPacket
impl Send for SphinxPacket
impl Sync for SphinxPacket
impl Unpin for SphinxPacket
impl UnwindSafe for SphinxPacket
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