pub struct StreamRefMutRaw<'a, S: AsFd, C: TlsSession> { /* private fields */ }
Expand description
See Stream::as_mut_raw
.
Implementations§
Source§impl<S: AsFd, C: TlsSession> StreamRefMutRaw<'_, S, C>
impl<S: AsFd, C: TlsSession> StreamRefMutRaw<'_, S, C>
Sourcepub fn try_read_io<F, R>(&mut self, f: F) -> Result<R>
pub fn try_read_io<F, R>(&mut self, f: F) -> Result<R>
Performs read operation on the inner socket, handles possible errors
with Context::handle_io_error
and retries the operation if the
error is recoverable (see Context::handle_io_error
for details).
§Prerequisites
The caller SHOULD NOT perform any write operations in f
.
§Errors
-
If the read side of the TLS stream is closed, this will return an EOF.
-
Returns the original I/O error returned by
f
that is unrecoverable.See also
Context::handle_io_error
.
Sourcepub fn try_write_io<F, R>(&mut self, f: F) -> Result<R>
pub fn try_write_io<F, R>(&mut self, f: F) -> Result<R>
Performs write operation on the inner socket, handles possible errors
with Context::handle_io_error
and retries the operation if the
error is recoverable (see Context::handle_io_error
for details).
§Prerequisites
The caller SHOULD NOT perform any read operations in f
.
§Errors
-
If the write side of the TLS stream is closed, this will return an EOF.
-
Returns the original I/O error returned by
f
that is unrecoverable.See also
Context::handle_io_error
.
Sourcepub fn handle_io_error(&mut self, err: Error) -> Result<()>
pub fn handle_io_error(&mut self, err: Error) -> Result<()>
Since StreamRefMutRaw
provides direct access to the inner socket,
the caller MUST handle any possible I/O errors returned by I/O
operations on the inner socket with this method.
See also Context::handle_io_error
.