Struct rustls::crypto::cipher::BorrowedPlainMessage
source · pub struct BorrowedPlainMessage<'a> {
pub typ: ContentType,
pub version: ProtocolVersion,
pub payload: &'a [u8],
}
Expand description
A TLS frame, named TLSPlaintext in the standard.
This type differs from OpaqueMessage
because it borrows
its payload. You can make a OpaqueMessage
from an
BorrowMessage
, but this involves a copy.
This type also cannot decode its internals and
cannot be read/encoded; only OpaqueMessage
can do that.
Fields§
§typ: ContentType
§version: ProtocolVersion
§payload: &'a [u8]
Implementations§
source§impl<'a> BorrowedPlainMessage<'a>
impl<'a> BorrowedPlainMessage<'a>
pub fn to_unencrypted_opaque(&self) -> OpaqueMessage
Auto Trait Implementations§
impl<'a> Freeze for BorrowedPlainMessage<'a>
impl<'a> RefUnwindSafe for BorrowedPlainMessage<'a>
impl<'a> Send for BorrowedPlainMessage<'a>
impl<'a> Sync for BorrowedPlainMessage<'a>
impl<'a> Unpin for BorrowedPlainMessage<'a>
impl<'a> UnwindSafe for BorrowedPlainMessage<'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