pub enum Transport {
Mem(MemTransport),
Stream(StreamTransport),
}Variants§
Mem(MemTransport)
Stream(StreamTransport)
Implementations§
Source§impl Transport
impl Transport
pub async fn send_frame(&self, frame: Frame) -> Result<(), TransportError>
pub async fn recv_frame(&self) -> Result<Frame, TransportError>
pub fn close(&self)
pub fn is_closed(&self) -> bool
pub fn mem_pair() -> (Self, Self)
pub fn stream<S>(stream: S) -> Self
pub fn stream_pair() -> (Self, Self)
Trait Implementations§
Source§impl From<MemTransport> for Transport
Available on crate feature mem only.
impl From<MemTransport> for Transport
Available on crate feature
mem only.Source§fn from(v: MemTransport) -> Transport
fn from(v: MemTransport) -> Transport
Converts to this type from the input type.
Source§impl From<StreamTransport> for Transport
Available on crate feature stream and non-WebAssembly only.
impl From<StreamTransport> for Transport
Available on crate feature
stream and non-WebAssembly only.Source§fn from(v: StreamTransport) -> Transport
fn from(v: StreamTransport) -> Transport
Converts to this type from the input type.
Source§impl TryInto<MemTransport> for Transport
Available on crate feature mem only.
impl TryInto<MemTransport> for Transport
Available on crate feature
mem only.Source§impl TryInto<StreamTransport> for Transport
Available on crate feature stream and non-WebAssembly only.
impl TryInto<StreamTransport> for Transport
Available on crate feature
stream and non-WebAssembly only.Auto Trait Implementations§
impl Freeze for Transport
impl !RefUnwindSafe for Transport
impl Send for Transport
impl Sync for Transport
impl Unpin for Transport
impl !UnwindSafe for Transport
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more