pub struct Writer<'a> { /* private fields */ }展开描述
A structure that implements std::io::Write 用于 writing 明文.
Trait 实现§
Source§impl Write for Writer<'_>
impl Write for Writer<'_>
Source§fn write(&mut self, buf: &[u8]) -> Result<usize>
fn write(&mut self, buf: &[u8]) -> Result<usize>
发送明文 buf 到 the peer, encrypting
并 authenticating it. Once 此函数 succeeds
you should call Connection::write_tls which will output the
corresponding TLS records.
This function buffers 明文 sent before the
TLS handshake completes, 并 sends it as soon
as it can. ,请参见ConnectionCommon::set_buffer_limit 到 control
the size of this 缓冲区.
Source§fn flush(&mut self) -> Result<()>
fn flush(&mut self) -> Result<()>
Flushes this output stream, ensuring that all intermediately buffered
contents reach their destination. 更多信息
Source§fn is_write_vectored(&self) -> bool
fn is_write_vectored(&self) -> bool
🔬This is a nightly-only experimental API. (
can_vector)1.0.0 · Source§fn write_all(&mut self, buf: &[u8]) -> Result<(), Error>
fn write_all(&mut self, buf: &[u8]) -> Result<(), Error>
Attempts 到 write an entire 缓冲区 into this writer. 更多信息
Source§fn write_all_vectored(&mut self, bufs: &mut [IoSlice<'_>]) -> Result<(), Error>
fn write_all_vectored(&mut self, bufs: &mut [IoSlice<'_>]) -> Result<(), Error>
🔬This is a nightly-only experimental API. (
write_all_vectored)Attempts 到 write multiple buffers into this writer. 更多信息
自动 Trait 实现§
impl<'a> Freeze for Writer<'a>
impl<'a> !RefUnwindSafe for Writer<'a>
impl<'a> !Send for Writer<'a>
impl<'a> !Sync for Writer<'a>
impl<'a> Unpin for Writer<'a>
impl<'a> UnsafeUnpin for Writer<'a>
impl<'a> !UnwindSafe for Writer<'a>
Blanket 实现§
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 从 an owned value. 更多信息