跳到主要内容

WriteEarlyData

结构体 WriteEarlyData 

Source
pub struct WriteEarlyData<'a> { /* private fields */ }
展开描述

Stub that implements io::Write 并 dispatches 到 write_early_data

实现§

Source§

impl<'a> WriteEarlyData<'a>

Source

pub fn bytes_left(&self) -> usize

可发送的字节数量 once this reaches zero.

Trait 实现§

Source§

impl Write for WriteEarlyData<'_>

Source§

fn write(&mut self, buf: &[u8]) -> Result<usize>

Writes 缓冲区 into this writer, returning how many bytes were written. 更多信息
Source§

fn flush(&mut self) -> Result<()>

Flushes this output stream, ensuring that all intermediately buffered contents reach their destination. 更多信息
1.36.0 · Source§

fn write_vectored(&mut self, bufs: &[IoSlice<'_>]) -> Result<usize, Error>

Like write, except that it writes 从 一个 slice of buffers. 更多信息
Source§

fn is_write_vectored(&self) -> bool

🔬This is a nightly-only experimental API. (can_vector)
Determines if this Writer has an efficient write_vectored implementation. 更多信息
1.0.0 · Source§

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>

🔬This is a nightly-only experimental API. (write_all_vectored)
Attempts 到 write multiple buffers into this writer. 更多信息
1.0.0 · Source§

fn write_fmt(&mut self, args: Arguments<'_>) -> Result<(), Error>

Writes 一个 formatted string into this writer, returning any error encountered. 更多信息
1.0.0 · Source§

fn by_ref(&mut self) -> &mut Self
where Self: Sized,

Creates 一个 “by reference” adapter 用于 this instance of Write. 更多信息

自动 Trait 实现§

§

impl<'a> Freeze for WriteEarlyData<'a>

§

impl<'a> !RefUnwindSafe 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>

§

impl<'a> !UnwindSafe for WriteEarlyData<'a>

Blanket 实现§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. 更多信息
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows 从 an owned value. 更多信息
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows 从 an owned value. 更多信息
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

原样返回传入的参数。

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::从(self)

That is, this conversion is whatever the implementation of From<T> 用于 U 的实现方式。

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

转换出错时返回的类型。
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

执行转换。
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

转换出错时返回的类型。
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

执行转换。