pub struct MemTransportServer { /* private fields */ }Expand description
An entirely in-process TransportServer used by the integration test harness.
Servers created by MemTransportFactory share a process-wide registry keyed by port;
“sending a request” from one client to one server becomes a channel send on the registry.
There is no serialization to sockets, no DNS, no kernel — which makes this both
dramatically faster than a real network and fully deterministic when paired with a virtual
crate::tools::time_provider::time_provider::TimeProvider. Port 0 is translated to a
freshly-allocated port number, mirroring the semantics of a real OS bind.
Not for production use: there is nothing here that crosses a process or host boundary.
Trait Implementations§
Source§impl TransportServer for MemTransportServer
impl TransportServer for MemTransportServer
Auto Trait Implementations§
impl Freeze for MemTransportServer
impl !RefUnwindSafe for MemTransportServer
impl Send for MemTransportServer
impl Sync for MemTransportServer
impl Unpin for MemTransportServer
impl UnsafeUnpin for MemTransportServer
impl !UnwindSafe for MemTransportServer
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