Type Definition deno_net::io::TcpStreamResource
source · [−]pub type TcpStreamResource = FullDuplexResource<OwnedReadHalf, OwnedWriteHalf>;
Implementations
Trait Implementations
sourceimpl Resource for TcpStreamResource
impl Resource for TcpStreamResource
sourcefn name(&self) -> Cow<'_, str>
fn name(&self) -> Cow<'_, str>
Returns a string representation of the resource which is made available
to JavaScript code through op_resources
. The default implementation
returns the Rust type name, but specific resource types may override this
trait method. Read more
sourcefn read(self: Rc<Self>, buf: ZeroCopyBuf) -> AsyncResult<usize>
fn read(self: Rc<Self>, buf: ZeroCopyBuf) -> AsyncResult<usize>
Resources may implement read()
to be a readable stream
sourcefn write(self: Rc<Self>, buf: ZeroCopyBuf) -> AsyncResult<usize>
fn write(self: Rc<Self>, buf: ZeroCopyBuf) -> AsyncResult<usize>
Resources may implement write()
to be a writable stream
sourcefn shutdown(self: Rc<Self>) -> AsyncResult<()>
fn shutdown(self: Rc<Self>) -> AsyncResult<()>
Resources may implement shutdown()
for graceful async shutdowns