pub struct Control { /* private fields */ }Implementations§
Source§impl Control
impl Control
pub fn new(sender: Sender<ControlCommand>) -> Self
Sourcepub async fn open_stream(&mut self) -> Result<Stream, ConnectionError>
pub async fn open_stream(&mut self) -> Result<Stream, ConnectionError>
Open a new stream to the remote.
Sourcepub async fn accept_stream(&mut self) -> Result<Stream, ConnectionError>
pub async fn accept_stream(&mut self) -> Result<Stream, ConnectionError>
Accept a new stream from the remote.
Sourcepub async fn close(&mut self) -> Result<(), ConnectionError>
pub async fn close(&mut self) -> Result<(), ConnectionError>
Close the connection.
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