pub trait AsyncWrapperOps<A>:
Debug
+ Unpin
+ Send
+ 'staticwhere
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§
Sourcetype SyncWrapper: Read + Write + WriteShutdown + Unpin + Send + 'static
type SyncWrapper: Read + Write + WriteShutdown + Unpin + Send + 'static
API-implementation of wrapper stream.
Wrapped object is always AsyncIoAsSyncIo
.
Required Methods§
Sourcefn debug(w: &Self::SyncWrapper) -> &dyn Debug
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
.
Sourcefn get_mut(w: &mut Self::SyncWrapper) -> &mut AsyncIoAsSyncIo<A> ⓘ
fn get_mut(w: &mut Self::SyncWrapper) -> &mut AsyncIoAsSyncIo<A> ⓘ
Unwrap the wrapper.
Sourcefn get_ref(w: &Self::SyncWrapper) -> &AsyncIoAsSyncIo<A> ⓘ
fn get_ref(w: &Self::SyncWrapper) -> &AsyncIoAsSyncIo<A> ⓘ
Unwrap the wrapper.
Sourcefn get_alpn_protocol(w: &Self::SyncWrapper) -> Result<Option<Vec<u8>>>
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", so this trait is not object safe.