[−][src]Struct libp2p::core::nodes::raw_swarm::PeerNotConnected
Access to a peer we're not connected to.
Methods
impl<'a, TTrans, TInEvent, TOutEvent, TMuxer, THandler, THandlerErr, TConnInfo, TPeerId> PeerNotConnected<'a, TTrans, TInEvent, TOutEvent, THandler, THandlerErr, TConnInfo, TPeerId> where
THandler: IntoNodeHandler<(TConnInfo, ConnectedPoint)> + Send + 'static,
THandlerErr: Error + Send + 'static,
TInEvent: Send + 'static,
TMuxer: StreamMuxer + Send + Sync + 'static,
TOutEvent: Send + 'static,
TTrans: Transport<Output = (TConnInfo, TMuxer)> + Clone,
<TTrans as Transport>::Error: Send,
<TTrans as Transport>::Error: 'static,
<TTrans as Transport>::Dial: Send,
<TTrans as Transport>::Dial: 'static,
<TMuxer as StreamMuxer>::OutboundSubstream: Send,
<TMuxer as StreamMuxer>::Substream: Send,
<THandler as IntoNodeHandler<(TConnInfo, ConnectedPoint)>>::Handler: NodeHandler,
<THandler as IntoNodeHandler<(TConnInfo, ConnectedPoint)>>::Handler: Send,
<THandler as IntoNodeHandler<(TConnInfo, ConnectedPoint)>>::Handler: 'static,
<<THandler as IntoNodeHandler<(TConnInfo, ConnectedPoint)>>::Handler as NodeHandler>::OutboundOpenInfo: Send,
<<THandler as IntoNodeHandler<(TConnInfo, ConnectedPoint)>>::Handler as NodeHandler>::OutboundOpenInfo: 'static,
<<THandler as IntoNodeHandler<(TConnInfo, ConnectedPoint)>>::Handler as NodeHandler>::Substream == SubstreamRef<Arc<TMuxer>>,
<<THandler as IntoNodeHandler<(TConnInfo, ConnectedPoint)>>::Handler as NodeHandler>::InEvent == TInEvent,
<<THandler as IntoNodeHandler<(TConnInfo, ConnectedPoint)>>::Handler as NodeHandler>::OutEvent == TOutEvent,
<<THandler as IntoNodeHandler<(TConnInfo, ConnectedPoint)>>::Handler as NodeHandler>::Error == THandlerErr,
[src]
THandler: IntoNodeHandler<(TConnInfo, ConnectedPoint)> + Send + 'static,
THandlerErr: Error + Send + 'static,
TInEvent: Send + 'static,
TMuxer: StreamMuxer + Send + Sync + 'static,
TOutEvent: Send + 'static,
TTrans: Transport<Output = (TConnInfo, TMuxer)> + Clone,
<TTrans as Transport>::Error: Send,
<TTrans as Transport>::Error: 'static,
<TTrans as Transport>::Dial: Send,
<TTrans as Transport>::Dial: 'static,
<TMuxer as StreamMuxer>::OutboundSubstream: Send,
<TMuxer as StreamMuxer>::Substream: Send,
<THandler as IntoNodeHandler<(TConnInfo, ConnectedPoint)>>::Handler: NodeHandler,
<THandler as IntoNodeHandler<(TConnInfo, ConnectedPoint)>>::Handler: Send,
<THandler as IntoNodeHandler<(TConnInfo, ConnectedPoint)>>::Handler: 'static,
<<THandler as IntoNodeHandler<(TConnInfo, ConnectedPoint)>>::Handler as NodeHandler>::OutboundOpenInfo: Send,
<<THandler as IntoNodeHandler<(TConnInfo, ConnectedPoint)>>::Handler as NodeHandler>::OutboundOpenInfo: 'static,
<<THandler as IntoNodeHandler<(TConnInfo, ConnectedPoint)>>::Handler as NodeHandler>::Substream == SubstreamRef<Arc<TMuxer>>,
<<THandler as IntoNodeHandler<(TConnInfo, ConnectedPoint)>>::Handler as NodeHandler>::InEvent == TInEvent,
<<THandler as IntoNodeHandler<(TConnInfo, ConnectedPoint)>>::Handler as NodeHandler>::OutEvent == TOutEvent,
<<THandler as IntoNodeHandler<(TConnInfo, ConnectedPoint)>>::Handler as NodeHandler>::Error == THandlerErr,
pub fn connect(
self,
addr: Multiaddr,
handler: THandler
) -> PeerPendingConnect<'a, TTrans, TInEvent, TOutEvent, THandler, THandlerErr, TConnInfo, TPeerId> where
TConnInfo: Debug + ConnectionInfo<PeerId = TPeerId> + Send + 'static,
TPeerId: Eq + Hash + Clone + Send + 'static,
[src]
self,
addr: Multiaddr,
handler: THandler
) -> PeerPendingConnect<'a, TTrans, TInEvent, TOutEvent, THandler, THandlerErr, TConnInfo, TPeerId> where
TConnInfo: Debug + ConnectionInfo<PeerId = TPeerId> + Send + 'static,
TPeerId: Eq + Hash + Clone + Send + 'static,
Attempts a new connection to this node using the given multiaddress.
If we reach a peer but the PeerId
doesn't correspond to the one we're expecting, then
the whole connection is immediately closed.
pub fn connect_iter<TIter>(
self,
addrs: TIter,
handler: THandler
) -> Result<PeerPendingConnect<'a, TTrans, TInEvent, TOutEvent, THandler, THandlerErr, TConnInfo, TPeerId>, PeerNotConnected<'a, TTrans, TInEvent, TOutEvent, THandler, THandlerErr, TConnInfo, TPeerId>> where
TConnInfo: Debug + ConnectionInfo<PeerId = TPeerId> + Send + 'static,
TIter: IntoIterator<Item = Multiaddr>,
TPeerId: Eq + Hash + Clone + Send + 'static,
[src]
self,
addrs: TIter,
handler: THandler
) -> Result<PeerPendingConnect<'a, TTrans, TInEvent, TOutEvent, THandler, THandlerErr, TConnInfo, TPeerId>, PeerNotConnected<'a, TTrans, TInEvent, TOutEvent, THandler, THandlerErr, TConnInfo, TPeerId>> where
TConnInfo: Debug + ConnectionInfo<PeerId = TPeerId> + Send + 'static,
TIter: IntoIterator<Item = Multiaddr>,
TPeerId: Eq + Hash + Clone + Send + 'static,
Attempts a new connection to this node using the given multiaddresses.
The multiaddresses passed as parameter will be tried one by one.
Returns an error if the iterator is empty.
If we reach a peer but the PeerId
doesn't correspond to the one we're expecting, then
the whole connection is immediately closed.
Trait Implementations
impl<'a, TTrans, TInEvent, TOutEvent, THandler, THandlerErr, TConnInfo, TPeerId> Debug for PeerNotConnected<'a, TTrans, TInEvent, TOutEvent, THandler, THandlerErr, TConnInfo, TPeerId> where
TPeerId: Debug,
TTrans: Transport,
[src]
TPeerId: Debug,
TTrans: Transport,
Auto Trait Implementations
impl<'a, TTrans, TInEvent, TOutEvent, THandler, THandlerErr, TConnInfo, TPeerId> Send for PeerNotConnected<'a, TTrans, TInEvent, TOutEvent, THandler, THandlerErr, TConnInfo, TPeerId> where
TConnInfo: Send,
THandler: Send,
THandlerErr: Send,
TInEvent: Send,
TOutEvent: Send,
TPeerId: Send,
TTrans: Send,
<TTrans as Transport>::Error: Send,
<TTrans as Transport>::Listener: Send,
TConnInfo: Send,
THandler: Send,
THandlerErr: Send,
TInEvent: Send,
TOutEvent: Send,
TPeerId: Send,
TTrans: Send,
<TTrans as Transport>::Error: Send,
<TTrans as Transport>::Listener: Send,
impl<'a, TTrans, TInEvent, TOutEvent, THandler, THandlerErr, TConnInfo, TPeerId> !Sync for PeerNotConnected<'a, TTrans, TInEvent, TOutEvent, THandler, THandlerErr, TConnInfo, TPeerId>
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> Erased for T
impl<T> Erased for T
impl<T> Typeable for T where
T: Any,
T: Any,