pub struct PeerConnection { /* private fields */ }Expand description
A cloneable handle to one verified direct peer identity.
Initial Node::connect establishes the peer and
synchronizes routes before returning. An unintentional loss is maintained in
the background. disconnect is terminal for every clone
of this handle generation.
Implementations§
Source§impl PeerConnection
impl PeerConnection
pub fn peer(&self) -> &str
pub fn status(&self) -> ConnectionStatus
pub fn changed(&self) -> impl Future<Output = ConnectionStatus> + Send + 'static
Sourcepub fn disconnect(&self)
pub fn disconnect(&self)
Permanently disconnect this logical handle generation.
Trait Implementations§
Source§impl Clone for PeerConnection
impl Clone for PeerConnection
Source§fn clone(&self) -> PeerConnection
fn clone(&self) -> PeerConnection
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for PeerConnection
impl !UnwindSafe for PeerConnection
impl Freeze for PeerConnection
impl Send for PeerConnection
impl Sync for PeerConnection
impl Unpin for PeerConnection
impl UnsafeUnpin for PeerConnection
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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