pub struct Link { /* private fields */ }Expand description
A handle to a running link task. Cloning shares the task.
Implementations§
Source§impl Link
impl Link
Sourcepub fn spawn<T>(
io: T,
role: Role,
config: Config,
) -> (Link, Receiver<LinkEvent>)where
T: AsyncRead + AsyncWrite + Send + 'static,
pub fn spawn<T>(
io: T,
role: Role,
config: Config,
) -> (Link, Receiver<LinkEvent>)where
T: AsyncRead + AsyncWrite + Send + 'static,
Start a link task over io. Events arrive on the returned receiver;
a host link must be started with Link::reset.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Link
impl RefUnwindSafe for Link
impl Send for Link
impl Sync for Link
impl Unpin for Link
impl UnsafeUnpin for Link
impl UnwindSafe for Link
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