pub enum NymPacket {
Sphinx(SphinxPacket),
}Variants§
Sphinx(SphinxPacket)
Implementations§
Source§impl NymPacket
impl NymPacket
pub fn sphinx_build<M: AsRef<[u8]>>( use_legacy_sphinx_format: bool, size: usize, message: M, route: &[Node], destination: &Destination, delays: &[Delay], ) -> Result<NymPacket, NymPacketError>
pub fn sphinx_from_bytes(bytes: &[u8]) -> Result<NymPacket, NymPacketError>
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn to_bytes(&self) -> Result<Vec<u8>, NymPacketError>
pub fn process( self, node_secret_key: &PrivateKey, ) -> Result<NymProcessedPacket, NymPacketError>
pub fn sphinx_packet_ref(&self) -> Option<&SphinxPacket>
pub fn to_sphinx_packet(self) -> Option<SphinxPacket>
pub fn is_sphinx(&self) -> bool
Trait Implementations§
Auto Trait Implementations§
impl Freeze for NymPacket
impl RefUnwindSafe for NymPacket
impl Send for NymPacket
impl Sync for NymPacket
impl Unpin for NymPacket
impl UnsafeUnpin for NymPacket
impl UnwindSafe for NymPacket
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