pub struct ConnectedExits { /* private fields */ }Implementations§
Source§impl ConnectedExits
impl ConnectedExits
pub fn new( api_token: String, token: CancellationToken, ) -> (Self, Receiver<(PeerId, Vec<Multiaddr>)>)
pub fn expect( &self, peer_id: &PeerId, route_id: Option<&str>, addrs: Vec<Multiaddr>, )
pub fn is_expected(&self) -> bool
pub fn on_swarm_event(&self, event: &SwarmEvent<SnowstormBehaviourEvent>)
pub fn connected(&self, peer_id: &PeerId)
pub fn disconnected(&self, peer_id: &PeerId)
pub fn add(&self, peer_id: PeerId)
pub fn subscribe(&self) -> Receiver<HashSet<PeerId>>
pub async fn pick(&self) -> (Option<PeerId>, Option<String>)
Auto Trait Implementations§
impl !Freeze for ConnectedExits
impl !RefUnwindSafe for ConnectedExits
impl Send for ConnectedExits
impl Sync for ConnectedExits
impl Unpin for ConnectedExits
impl !UnwindSafe for ConnectedExits
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more