Struct libp2p_swarm::dial_opts::WithPeerId
source · pub struct WithPeerId { /* private fields */ }
Implementations§
source§impl WithPeerId
impl WithPeerId
sourcepub fn condition(self, condition: PeerCondition) -> Self
pub fn condition(self, condition: PeerCondition) -> Self
Specify a PeerCondition
for the dial.
sourcepub fn override_dial_concurrency_factor(self, factor: NonZeroU8) -> Self
pub fn override_dial_concurrency_factor(self, factor: NonZeroU8) -> Self
Override Number of addresses concurrently dialed for a single outbound connection attempt.
sourcepub fn addresses(self, addresses: Vec<Multiaddr>) -> WithPeerIdWithAddresses
pub fn addresses(self, addresses: Vec<Multiaddr>) -> WithPeerIdWithAddresses
Specify a set of addresses to be used to dial the known peer.
sourcepub fn override_role(self) -> Self
pub fn override_role(self) -> Self
Override role of local node on connection. I.e. execute the dial as a listener.
See
ConnectedPoint::Dialer
for details.
sourcepub fn allocate_new_port(self) -> Self
pub fn allocate_new_port(self) -> Self
Enforce the allocation of a new port. Default behaviour is best effort reuse of existing ports. If there is no existing fitting listener, a new port is allocated.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for WithPeerId
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
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
source§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