[][src]Struct libp2p::core::nodes::raw_swarm::PeerNotConnected

pub struct PeerNotConnected<'a, TTrans, TInEvent, TOutEvent, THandler, THandlerErr, TConnInfo, TPeerId> where
    TConnInfo: 'a,
    THandler: 'a,
    THandlerErr: 'a,
    TInEvent: 'a,
    TOutEvent: 'a,
    TPeerId: 'a,
    TTrans: Transport + 'a, 
{ /* fields omitted */ }

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]

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]

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]

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]

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

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]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

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

fn get_type(&self) -> TypeId

Get the TypeId of this object.