Skip to main content

AsyncWrapperOps

Trait AsyncWrapperOps 

Source
pub trait AsyncWrapperOps<A>:
    Debug
    + Unpin
    + Send
    + 'static
where A: Unpin,
{ type SyncWrapper: Read + Write + WriteShutdown + Unpin + Send + 'static; // Required methods fn impl_info() -> ImplInfo; fn debug(w: &Self::SyncWrapper) -> &dyn Debug; fn get_mut(w: &mut Self::SyncWrapper) -> &mut AsyncIoAsSyncIo<A> ; fn get_ref(w: &Self::SyncWrapper) -> &AsyncIoAsSyncIo<A> ; fn get_alpn_protocol(w: &Self::SyncWrapper) -> Result<Option<Vec<u8>>>; }
Expand description

Used by API implementors.

Required Associated Types§

Source

type SyncWrapper: Read + Write + WriteShutdown + Unpin + Send + 'static

API-implementation of wrapper stream.

Wrapped object is always AsyncIoAsSyncIo.

Required Methods§

Source

fn impl_info() -> ImplInfo

Which crates imlpements this?

Source

fn debug(w: &Self::SyncWrapper) -> &dyn Debug

Cast the wrapper to fmt::Debug or provide substitute debug. This is work around not all wrappers implementing fmt::Debug.

Source

fn get_mut(w: &mut Self::SyncWrapper) -> &mut AsyncIoAsSyncIo<A>

Unwrap the wrapper.

Source

fn get_ref(w: &Self::SyncWrapper) -> &AsyncIoAsSyncIo<A>

Unwrap the wrapper.

Source

fn get_alpn_protocol(w: &Self::SyncWrapper) -> Result<Option<Vec<u8>>>

Get negotiated ALPN protocol.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§