pub struct ListenFuture<S> { /* private fields */ }
Implementations§
Source§impl<S> ListenFuture<S>
impl<S> ListenFuture<S>
Sourcepub fn with_memory_addr_external(self) -> Self
pub fn with_memory_addr_external(self) -> Self
Adds the memory address we are starting to listen on as an external address using
[Swarm::add_external_address
].
This is typically “safe” for tests because within a process, memory addresses are “globally” reachable. However, some tests depend on which addresses are external and need this to be configurable so it is not a good default.
Sourcepub fn with_tcp_addr_external(self) -> Self
pub fn with_tcp_addr_external(self) -> Self
Adds the TCP address we are starting to listen on as an external address using
[Swarm::add_external_address
].
This is typically “safe” for tests because on the same machine, 127.0.0.1 is reachable for
other [Swarm
]s. However, some tests depend on which addresses are external and need
this to be configurable so it is not a good default.
Trait Implementations§
Source§impl<'s, B> IntoFuture for ListenFuture<&'s mut Swarm<B>>
impl<'s, B> IntoFuture for ListenFuture<&'s mut Swarm<B>>
Source§type IntoFuture = Pin<Box<dyn Future<Output = <ListenFuture<&'s mut Swarm<B>> as IntoFuture>::Output> + Send + 's>>
type IntoFuture = Pin<Box<dyn Future<Output = <ListenFuture<&'s mut Swarm<B>> as IntoFuture>::Output> + Send + 's>>
Which kind of future are we turning this into?
Source§fn into_future(self) -> Self::IntoFuture
fn into_future(self) -> Self::IntoFuture
Creates a future from a value. Read more
Auto Trait Implementations§
impl<S> Freeze for ListenFuture<S>where
S: Freeze,
impl<S> RefUnwindSafe for ListenFuture<S>where
S: RefUnwindSafe,
impl<S> Send for ListenFuture<S>where
S: Send,
impl<S> Sync for ListenFuture<S>where
S: Sync,
impl<S> Unpin for ListenFuture<S>where
S: Unpin,
impl<S> UnwindSafe for ListenFuture<S>where
S: UnwindSafe,
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
§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