pub struct NatsTestServer { /* private fields */ }
Expand description
A test server for NATS-based systems that can inject failures.
Implementations§
Source§impl NatsTestServer
A NATS test server, will be stopped on drop
impl NatsTestServer
A NATS test server, will be stopped on drop
pub fn build() -> NatsTestServerBuilder<&'static str>
Sourcepub fn address(&self) -> SocketAddr
pub fn address(&self) -> SocketAddr
Get the socket address on which the test server is listening
Sourcepub fn restart(self) -> NatsTestServerBuilder<SocketAddr>
pub fn restart(self) -> NatsTestServerBuilder<SocketAddr>
Consume and stop this server, start building a new one on the same port,
the return value is a builder and so you’ll need to call .spawn()
on
it.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for NatsTestServer
impl !RefUnwindSafe for NatsTestServer
impl Send for NatsTestServer
impl Sync for NatsTestServer
impl Unpin for NatsTestServer
impl !UnwindSafe for NatsTestServer
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