pub enum Data<Buffer> {
Buffer(Buffer),
AllocatedBox(Box<[u8]>),
Eof,
}
Expand description
The data returned by WriteEnd::send_read_request
.
Variants§
Buffer(Buffer)
The buffer that stores the response of Read.
It will be returned if you provided a buffer to
crate::WriteEnd::send_read_request
.
AllocatedBox(Box<[u8]>)
This is a fallback that is returned
if Buffer
isn’t provided or it isn’t large enough.
Eof
EOF is reached before any data can be read.
Trait Implementations§
Auto Trait Implementations§
impl<Buffer> Freeze for Data<Buffer>where
Buffer: Freeze,
impl<Buffer> RefUnwindSafe for Data<Buffer>where
Buffer: RefUnwindSafe,
impl<Buffer> Send for Data<Buffer>where
Buffer: Send,
impl<Buffer> Sync for Data<Buffer>where
Buffer: Sync,
impl<Buffer> Unpin for Data<Buffer>where
Buffer: Unpin,
impl<Buffer> UnwindSafe for Data<Buffer>where
Buffer: UnwindSafe,
Blanket Implementations§
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 from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)