pub struct ByteBuffer { /* private fields */ }
Expand description

异步字节缓冲区

Implementations

创建一个异步字节缓冲区

获取当前流是否已终止

判断当前缓冲区是否为空

获取当前缓冲区包含的所有字节长度

获取当前缓冲区剩余可读字节长度

流中已发送未接收的数据条目长度

清理前已读字节的总数量

异步获取一个i8

异步获取一个u8

异步获取一个大端i16

异步获取一个小端i16

异步获取一个大端u16

异步获取一个小端u16

异步获取一个大端i32

异步获取一个小端i32

异步获取一个大端u32

异步获取一个小端u32

异步获取一个大端i64

异步获取一个小端i64

异步获取一个大端u64

异步获取一个小端u64

异步获取一个大端i128

异步获取一个小端i128

异步获取一个大端u128

异步获取一个小端u128

异步获取一个大端isize

异步获取一个小端isize

异步获取一个大端usize

异步获取一个小端usize

异步获取一个大端f32

异步获取一个小端f32

异步获取一个大端f64

异步获取一个小端f64

异步获取指定长度的部分缓冲区

尝试异步获取指定长度的部分缓冲区, 此方法保证不会导致异步阻塞,同时此方法也不保证一定可以获取到不小于指定长度的部分缓冲区 当指定获取的字节数量为0,表示尝试获取当前流和当前缓冲区中所有剩余的未读字节

截断当前所有已读缓冲区 这会释放已读缓冲区的内存,并重置已读字节的总数量

清空当前缓冲区 这会释放当前缓冲区的所有内存,并重置已读字节的总数量

Trait Implementations

Converts this type into a shared reference of the (usually inferred) input type.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.