Struct deno_net::io::FullDuplexResource
source · [−]pub struct FullDuplexResource<R, W> { /* private fields */ }
Expand description
A full duplex resource has a read and write ends that are completely independent, like TCP/Unix sockets and TLS streams.
Implementations
sourceimpl<R, W> FullDuplexResource<R, W> where
R: AsyncRead + Unpin + 'static,
W: AsyncWrite + Unpin + 'static,
impl<R, W> FullDuplexResource<R, W> where
R: AsyncRead + Unpin + 'static,
W: AsyncWrite + Unpin + 'static,
pub fn new((rd, wr): (R, W)) -> Self
pub fn into_inner(self) -> (R, W)
pub fn rd_borrow_mut(self: &Rc<Self>) -> AsyncMutFuture<R>
pub fn wr_borrow_mut(self: &Rc<Self>) -> AsyncMutFuture<W>
pub fn cancel_handle(self: &Rc<Self>) -> RcRef<CancelHandle>
pub fn cancel_read_ops(&self)
pub async fn read(
self: Rc<Self>,
buf: ZeroCopyBuf
) -> Result<(usize, ZeroCopyBuf), AnyError>
pub async fn write(self: Rc<Self>, buf: ZeroCopyBuf) -> Result<usize, AnyError>
pub async fn shutdown(self: Rc<Self>) -> Result<(), AnyError>
Trait Implementations
Auto Trait Implementations
impl<R, W> !RefUnwindSafe for FullDuplexResource<R, W>
impl<R, W> !Send for FullDuplexResource<R, W>
impl<R, W> !Sync for FullDuplexResource<R, W>
impl<R, W> !Unpin for FullDuplexResource<R, W>
impl<R, W> !UnwindSafe for FullDuplexResource<R, W>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more