pub struct BorrowMessage<'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 Message
because it borrows
its payload. You can make a Message
from an
BorrowMessage
, but this involves a copy.
This type also cannot decode its internals and
is not a Codec
type, only Message
can do that.
Fields
typ: ContentType
version: ProtocolVersion
payload: &'a [u8]
Auto Trait Implementations
impl<'a> RefUnwindSafe for BorrowMessage<'a>
impl<'a> Send for BorrowMessage<'a>
impl<'a> Sync for BorrowMessage<'a>
impl<'a> Unpin for BorrowMessage<'a>
impl<'a> UnwindSafe for BorrowMessage<'a>
Blanket Implementations
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstablefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more