pub enum OutboundChunks<'a> {
Single(&'a [u8]),
Multiple {
chunks: &'a [&'a [u8]],
start: usize,
end: usize,
},
}展开描述
借用明文切片的集合
Warning: OutboundChunks does not guarantee that the simplest variant is 用. Multiple can hold non fragmented 或 empty payloads.
变体§
Single(&'a [u8])
A single byte slice. Contrary 到 Multiple, this uses 一个 single pointer indirection
Multiple
A collection of chunks (byte slices) 并 cursors 到 single out 一个 fragmented range of bytes. OutboundChunks assumes that start <= end
实现§
Source§impl<'a> OutboundChunks<'a>
impl<'a> OutboundChunks<'a>
Sourcepub fn new(chunks: &'a [&'a [u8]]) -> Self
pub fn new(chunks: &'a [&'a [u8]]) -> Self
创建一个 payload 从 一个 slice of byte slices. If fragmented the cursors are added by default: start = 0, end = length
Sourcepub fn new_empty() -> Self
pub fn new_empty() -> Self
Trait 实现§
Source§impl<'a> Clone for OutboundChunks<'a>
impl<'a> Clone for OutboundChunks<'a>
Source§fn clone(&self) -> OutboundChunks<'a>
fn clone(&self) -> OutboundChunks<'a>
返回值的副本。 更多信息
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment 从
source. 更多信息Source§impl<'a> Debug for OutboundChunks<'a>
impl<'a> Debug for OutboundChunks<'a>
自动 Trait 实现§
impl<'a> Freeze for OutboundChunks<'a>
impl<'a> RefUnwindSafe for OutboundChunks<'a>
impl<'a> Send for OutboundChunks<'a>
impl<'a> Sync for OutboundChunks<'a>
impl<'a> Unpin for OutboundChunks<'a>
impl<'a> UnsafeUnpin for OutboundChunks<'a>
impl<'a> UnwindSafe for OutboundChunks<'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. 更多信息