pub struct SessionWrite<'a, T>where
T: Write,{ /* private fields */ }Expand description
A type representing the write half of a TLS session when the session has been split into read and write halves.
Implementations§
Source§impl<T> SessionWrite<'_, T>where
T: Write,
impl<T> SessionWrite<'_, T>where
T: Write,
Sourcepub async fn write(&mut self, data: &[u8]) -> Result<usize, SessionError>
pub async fn write(&mut self, data: &[u8]) -> Result<usize, SessionError>
Write unencrypted data to the TLS connection
§Arguments
data- The data to write
§Returns
- The number of bytes written or an error
§Cancel safety
NOT cancel-safe, but never misreports. Same as Session::write: a
dropped write may leave a partially-sent record, but the next write
finishes it first and reports only its own buffer’s byte count.
Sourcepub async fn flush(&mut self) -> Result<(), SessionError>
pub async fn flush(&mut self) -> Result<(), SessionError>
Trait Implementations§
Source§impl<T> ErrorType for SessionWrite<'_, T>where
T: Write,
impl<T> ErrorType for SessionWrite<'_, T>where
T: Write,
Source§type Error = SessionError
type Error = SessionError
Error type of all the IO operations on this type.
Source§impl<T> Write for SessionWrite<'_, T>where
T: Write,
impl<T> Write for SessionWrite<'_, T>where
T: Write,
Source§async fn write(&mut self, buf: &[u8]) -> Result<usize, Self::Error>
async fn write(&mut self, buf: &[u8]) -> Result<usize, Self::Error>
Write a buffer into this writer, returning how many bytes were written. Read more
Auto Trait Implementations§
impl<'a, T> !Send for SessionWrite<'a, T>
impl<'a, T> !Sync for SessionWrite<'a, T>
impl<'a, T> !UnwindSafe for SessionWrite<'a, T>
impl<'a, T> Freeze for SessionWrite<'a, T>where
T: Freeze,
impl<'a, T> RefUnwindSafe for SessionWrite<'a, T>where
T: RefUnwindSafe,
impl<'a, T> Unpin for SessionWrite<'a, T>where
T: Unpin,
impl<'a, T> UnsafeUnpin for SessionWrite<'a, T>where
T: UnsafeUnpin,
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