#[non_exhaustive]pub enum Payload<'a> {
Borrowed(&'a [u8]),
Owned(Vec<u8>),
}Expand description
An externally length’d payload
When encountered in an EncodedMessage, it represents a plaintext payload. It can be
decrypted from an InboundOpaque or encrypted into an OutboundOpaque,
and it is also used for joining and fragmenting.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Implementations§
Trait Implementations§
impl<'a> Eq for Payload<'a>
impl<'a> StructuralPartialEq for Payload<'a>
Auto Trait Implementations§
impl<'a> Freeze for Payload<'a>
impl<'a> RefUnwindSafe for Payload<'a>
impl<'a> Send for Payload<'a>
impl<'a> Sync for Payload<'a>
impl<'a> Unpin for Payload<'a>
impl<'a> UnwindSafe for Payload<'a>
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