Struct deno_net::ops_tls::TlsStreamResource
source · [−]pub struct TlsStreamResource { /* private fields */ }
Implementations
sourceimpl TlsStreamResource
impl TlsStreamResource
pub fn new((rd, wr): (ReadHalf, WriteHalf)) -> Self
pub fn into_inner(self) -> (ReadHalf, WriteHalf)
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>
pub async fn handshake(self: &Rc<Self>) -> Result<TlsHandshakeInfo, AnyError>
Trait Implementations
sourceimpl Debug for TlsStreamResource
impl Debug for TlsStreamResource
sourceimpl Resource for TlsStreamResource
impl Resource for TlsStreamResource
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
fn read_return(
self: Rc<Self>,
buf: ZeroCopyBuf
) -> AsyncResult<(usize, ZeroCopyBuf)>
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
sourcefn close(self: Rc<Self>)
fn close(self: Rc<Self>)
Resources may implement the close()
trait method if they need to do
resource specific clean-ups, such as cancelling pending futures, after a
resource has been removed from the resource table. Read more
Auto Trait Implementations
impl !RefUnwindSafe for TlsStreamResource
impl !Send for TlsStreamResource
impl !Sync for TlsStreamResource
impl !Unpin for TlsStreamResource
impl !UnwindSafe for TlsStreamResource
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
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