pub struct WriteEarlyData<'a> { /* private fields */ }Expand description
Allows writing of early data in resumed TLS 1.3 connections.
“Early data” is also known as “0-RTT data”.
Use Self::write() to encrypt early data into TLS records.
Implementations§
Source§impl<'a> WriteEarlyData<'a>
impl<'a> WriteEarlyData<'a>
Sourcepub fn write(
&mut self,
plaintext: OutboundPlain<'_>,
tls: &mut Vec<u8>,
) -> Result<usize, Error>
pub fn write( &mut self, plaintext: OutboundPlain<'_>, tls: &mut Vec<u8>, ) -> Result<usize, Error>
Encrypt early data as TLS records and encode them into tls.
Yields the number of bytes of plaintext that were consumed. This may be less than
the length of plaintext if the server has limited the amount of early data that
may be sent.
Sourcepub fn bytes_left(&self) -> usize
pub fn bytes_left(&self) -> usize
How many bytes you may send. Writes will become short once this reaches zero.
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for WriteEarlyData<'a>
impl<'a> !UnwindSafe for WriteEarlyData<'a>
impl<'a> Freeze for WriteEarlyData<'a>
impl<'a> Send for WriteEarlyData<'a>
impl<'a> Sync for WriteEarlyData<'a>
impl<'a> Unpin for WriteEarlyData<'a>
impl<'a> UnsafeUnpin for WriteEarlyData<'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