pub struct IoContext(/* private fields */);Expand description
Context for io read task
Implementations§
Source§impl IoContext
impl IoContext
Sourcepub fn poll_read_ready(&self, cx: &mut Context<'_>) -> Poll<ReadStatus>
pub fn poll_read_ready(&self, cx: &mut Context<'_>) -> Poll<ReadStatus>
Check readiness for read operations
Sourcepub fn poll_write_ready(&self, cx: &mut Context<'_>) -> Poll<WriteStatus>
pub fn poll_write_ready(&self, cx: &mut Context<'_>) -> Poll<WriteStatus>
Check readiness for write operations
Sourcepub fn get_read_buf(&self) -> Poll<BytesVec>
pub fn get_read_buf(&self) -> Poll<BytesVec>
Get read buffer
pub fn release_read_buf(&self, buf: BytesVec)
Sourcepub fn get_write_buf(&self) -> Poll<BytesVec>
pub fn get_write_buf(&self) -> Poll<BytesVec>
Get write buffer
pub fn release_write_buf(&self, buf: BytesVec)
Sourcepub fn with_read_buf<F>(&self, f: F) -> Poll<()>
pub fn with_read_buf<F>(&self, f: F) -> Poll<()>
Get read buffer
pub fn with_write_buf<F>(&self, f: F) -> Poll<()>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for IoContext
impl !RefUnwindSafe for IoContext
impl !Send for IoContext
impl !Sync for IoContext
impl Unpin for IoContext
impl !UnwindSafe for IoContext
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