struct MockNetProviderInner {
addrs: Vec<IpAddr>,
net: Arc<MockNetwork>,
next_port: AtomicU16,
}
Expand description
Shared part of a MockNetworkProvider.
This is separate because providers need to implement Clone, but
next_port
can’t be cloned.
Fields§
§addrs: Vec<IpAddr>
List of public addresses
net: Arc<MockNetwork>
Shared reference to the network.
next_port: AtomicU16
Next port number to hand out when we’re asked to listen on port 0.
See discussion of limitations on listen()
implementation.
Auto Trait Implementations§
impl !Freeze for MockNetProviderInner
impl RefUnwindSafe for MockNetProviderInner
impl Send for MockNetProviderInner
impl Sync for MockNetProviderInner
impl Unpin for MockNetProviderInner
impl UnwindSafe for MockNetProviderInner
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> ⓘ
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