pub struct ReadEarlyData<'a> { /* private fields */ }
Available on crate feature
std
only.Expand description
Allows reading of early data in resumed TLS1.3 connections.
“Early data” is also known as “0-RTT data”.
This type implements io::Read
.
Implementations§
Source§impl<'a> ReadEarlyData<'a>
impl<'a> ReadEarlyData<'a>
Sourcepub fn exporter(&mut self) -> Result<KeyingMaterialExporter, Error>
pub fn exporter(&mut self) -> Result<KeyingMaterialExporter, Error>
Returns the “early” exporter that can derive key material for use in early data
See RFC5705 for general details on what exporters are, and RFC8446 S7.5 for specific details on the “early” exporter.
Beware that the early exporter requires care, as it is subject to the same potential for replay as early data itself. See RFC8446 appendix E.5.1 for more detail.
This function can be called at most once per connection. This function will error: if called more than once per connection.
If you are looking for the normal exporter, this is available from
ConnectionCommon::exporter()
.
Trait Implementations§
Source§impl Read for ReadEarlyData<'_>
impl Read for ReadEarlyData<'_>
Source§fn read(&mut self, buf: &mut [u8]) -> Result<usize>
fn read(&mut self, buf: &mut [u8]) -> Result<usize>
Pull some bytes from this source into the specified buffer, returning
how many bytes were read. Read more
1.36.0 · Source§fn read_vectored(&mut self, bufs: &mut [IoSliceMut<'_>]) -> Result<usize, Error>
fn read_vectored(&mut self, bufs: &mut [IoSliceMut<'_>]) -> Result<usize, Error>
Like
read
, except that it reads into a slice of buffers. Read moreSource§fn is_read_vectored(&self) -> bool
fn is_read_vectored(&self) -> bool
🔬This is a nightly-only experimental API. (
can_vector
)1.0.0 · Source§fn read_to_end(&mut self, buf: &mut Vec<u8>) -> Result<usize, Error>
fn read_to_end(&mut self, buf: &mut Vec<u8>) -> Result<usize, Error>
Reads all bytes until EOF in this source, placing them into
buf
. Read more1.0.0 · Source§fn read_to_string(&mut self, buf: &mut String) -> Result<usize, Error>
fn read_to_string(&mut self, buf: &mut String) -> Result<usize, Error>
Reads all bytes until EOF in this source, appending them to
buf
. Read more1.6.0 · Source§fn read_exact(&mut self, buf: &mut [u8]) -> Result<(), Error>
fn read_exact(&mut self, buf: &mut [u8]) -> Result<(), Error>
Reads the exact number of bytes required to fill
buf
. Read moreSource§fn read_buf(&mut self, buf: BorrowedCursor<'_>) -> Result<(), Error>
fn read_buf(&mut self, buf: BorrowedCursor<'_>) -> Result<(), Error>
🔬This is a nightly-only experimental API. (
read_buf
)Pull some bytes from this source into the specified buffer. Read more
Source§fn read_buf_exact(&mut self, cursor: BorrowedCursor<'_>) -> Result<(), Error>
fn read_buf_exact(&mut self, cursor: BorrowedCursor<'_>) -> Result<(), Error>
🔬This is a nightly-only experimental API. (
read_buf
)Reads the exact number of bytes required to fill
cursor
. Read more1.0.0 · Source§fn by_ref(&mut self) -> &mut Selfwhere
Self: Sized,
fn by_ref(&mut self) -> &mut Selfwhere
Self: Sized,
Creates a “by reference” adapter for this instance of
Read
. Read moreAuto Trait Implementations§
impl<'a> Freeze for ReadEarlyData<'a>
impl<'a> !RefUnwindSafe for ReadEarlyData<'a>
impl<'a> Send for ReadEarlyData<'a>
impl<'a> Sync for ReadEarlyData<'a>
impl<'a> Unpin for ReadEarlyData<'a>
impl<'a> !UnwindSafe for ReadEarlyData<'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