pub struct Control { /* private fields */ }
Expand description
A Yamux Connection
controller.
This presents an alternative API for using a yamux Connection
.
A Control
communicates with a ControlledConnection
via a channel. This allows
a Control
to be cloned and shared between tasks and threads.
Implementations§
source§impl Control
impl Control
pub fn new<T>(connection: Connection<T>) -> (Self, ControlledConnection<T>)
sourcepub async fn open_stream(&mut self) -> Result<Stream>
pub async fn open_stream(&mut self) -> Result<Stream>
Open a new stream to the remote.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Control
impl !RefUnwindSafe for Control
impl Send for Control
impl Sync for Control
impl Unpin for Control
impl !UnwindSafe for Control
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)