Struct libp2p::swarm::dial_opts::WithPeerId
source · pub struct WithPeerId { /* private fields */ }
Implementations§
source§impl WithPeerId
impl WithPeerId
sourcepub fn condition(self, condition: PeerCondition) -> WithPeerId
pub fn condition(self, condition: PeerCondition) -> WithPeerId
Specify a PeerCondition
for the dial.
sourcepub fn override_dial_concurrency_factor(self, factor: NonZeroU8) -> WithPeerId
pub fn override_dial_concurrency_factor(self, factor: NonZeroU8) -> WithPeerId
Override Number of addresses concurrently dialed for a single outbound connection attempt.
sourcepub fn addresses(
self,
addresses: Vec<Multiaddr, Global>
) -> WithPeerIdWithAddresses
pub fn addresses( self, addresses: Vec<Multiaddr, Global> ) -> WithPeerIdWithAddresses
Specify a set of addresses to be used to dial the known peer.
sourcepub fn override_role(self) -> WithPeerId
pub fn override_role(self) -> WithPeerId
Override role of local node on connection. I.e. execute the dial as a listener.
See
ConnectedPoint::Dialer
for details.
sourcepub fn build(self) -> DialOpts
pub fn build(self) -> DialOpts
Build the final DialOpts
.
Addresses to dial the peer are retrieved via
NetworkBehaviour::addresses_of_peer
.
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for WithPeerId
impl Send for WithPeerId
impl Sync for WithPeerId
impl Unpin for WithPeerId
impl UnwindSafe for WithPeerId
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