pub struct SealedEnvelope {
pub encoding: Encoding,
pub length: usize,
pub payload: Vec<u8>,
pub broadcast: bool,
}
Expand description
Sealed envelope is an encrypted message.
The payload has been encrypted using the noise protocol channel and the recipient must decrypt and decode the payload.
Fields§
§encoding: Encoding
Encoding for the payload.
length: usize
Length of the payload data.
payload: Vec<u8>
Encrypted payload.
broadcast: bool
Whether this is a broadcast message.
Trait Implementations§
Source§impl Debug for SealedEnvelope
impl Debug for SealedEnvelope
Source§impl Decodable for SealedEnvelope
impl Decodable for SealedEnvelope
Source§fn decode<'life0, 'life1, 'async_trait, R>(
&'life0 mut self,
reader: &'life1 mut BinaryReader<R>,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
R: 'async_trait + AsyncRead + AsyncSeek + Unpin + Send,
SealedEnvelope: 'async_trait,
fn decode<'life0, 'life1, 'async_trait, R>(
&'life0 mut self,
reader: &'life1 mut BinaryReader<R>,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
R: 'async_trait + AsyncRead + AsyncSeek + Unpin + Send,
SealedEnvelope: 'async_trait,
Decode from the binary reader into self.
Source§impl Default for SealedEnvelope
impl Default for SealedEnvelope
Source§fn default() -> SealedEnvelope
fn default() -> SealedEnvelope
Returns the “default value” for a type. Read more
Source§impl Encodable for SealedEnvelope
impl Encodable for SealedEnvelope
Source§fn encode<'life0, 'life1, 'async_trait, W>(
&'life0 self,
writer: &'life1 mut BinaryWriter<W>,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
W: 'async_trait + AsyncWrite + AsyncSeek + Unpin + Send,
SealedEnvelope: 'async_trait,
fn encode<'life0, 'life1, 'async_trait, W>(
&'life0 self,
writer: &'life1 mut BinaryWriter<W>,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
W: 'async_trait + AsyncWrite + AsyncSeek + Unpin + Send,
SealedEnvelope: 'async_trait,
Encode self into the binary writer.
Auto Trait Implementations§
impl Freeze for SealedEnvelope
impl RefUnwindSafe for SealedEnvelope
impl Send for SealedEnvelope
impl Sync for SealedEnvelope
impl Unpin for SealedEnvelope
impl UnwindSafe for SealedEnvelope
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