Struct InboundOpaqueMessage
pub struct InboundOpaqueMessage<'a> {
pub typ: ContentType,
pub version: ProtocolVersion,
pub payload: BorrowedPayload<'a>,
}rustls or boring or acme) and crate feature rustls only.Expand description
A TLS frame, named TLSPlaintext in the standard.
This inbound type borrows its encrypted payload from a buffer elsewhere. It is used for joining and is consumed by decryption.
Fields§
§typ: ContentType§version: ProtocolVersion§payload: BorrowedPayload<'a>Implementations§
§impl<'a> InboundOpaqueMessage<'a>
impl<'a> InboundOpaqueMessage<'a>
pub fn new(
typ: ContentType,
version: ProtocolVersion,
payload: &'a mut [u8],
) -> InboundOpaqueMessage<'a>
pub fn new( typ: ContentType, version: ProtocolVersion, payload: &'a mut [u8], ) -> InboundOpaqueMessage<'a>
Construct a new InboundOpaqueMessage from constituent fields.
payload is borrowed.
pub fn into_plain_message(self) -> InboundPlainMessage<'a>
pub fn into_plain_message(self) -> InboundPlainMessage<'a>
Force conversion into a plaintext message.
This should only be used for messages that are known to be in plaintext. Otherwise, the
InboundOpaqueMessage should be decrypted into a PlainMessage using a MessageDecrypter.
pub fn into_plain_message_range(
self,
range: Range<usize>,
) -> InboundPlainMessage<'a>
pub fn into_plain_message_range( self, range: Range<usize>, ) -> InboundPlainMessage<'a>
Force conversion into a plaintext message.
range restricts the resulting message: this function panics if it is out of range for
the underlying message payload.
This should only be used for messages that are known to be in plaintext. Otherwise, the
InboundOpaqueMessage should be decrypted into a PlainMessage using a MessageDecrypter.
pub fn into_tls13_unpadded_message(
self,
) -> Result<InboundPlainMessage<'a>, Error>
pub fn into_tls13_unpadded_message( self, ) -> Result<InboundPlainMessage<'a>, Error>
For TLS1.3 (only), checks the length msg.payload is valid and removes the padding.
Returns an error if the message (pre-unpadding) is too long, or the padding is invalid, or the message (post-unpadding) is too long.
Auto Trait Implementations§
impl<'a> Freeze for InboundOpaqueMessage<'a>
impl<'a> RefUnwindSafe for InboundOpaqueMessage<'a>
impl<'a> Send for InboundOpaqueMessage<'a>
impl<'a> Sync for InboundOpaqueMessage<'a>
impl<'a> Unpin for InboundOpaqueMessage<'a>
impl<'a> !UnwindSafe for InboundOpaqueMessage<'a>
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§fn and<P, B, E>(self, other: P) -> And<T, P>
fn and<P, B, E>(self, other: P) -> And<T, P>
Policy that returns Action::Follow only if self and other return
Action::Follow. Read more