pub struct Server { /* private fields */ }Expand description
Entry point for the test, waiting for the application to start
Implementations§
Source§impl Server
impl Server
Sourcepub fn new() -> Result<Server>
pub fn new() -> Result<Server>
Start new TCP server, waiting for the application’s startup notification
Sourcepub fn port(&self) -> Result<u16>
pub fn port(&self) -> Result<u16>
Get the port number of the TCP Server
This port number has to sent to the application.
Sourcepub fn wait(self, timeout: Duration) -> Result<Duration>
pub fn wait(self, timeout: Duration) -> Result<Duration>
Block the currently running thread until either the starting application has signaled its successful start or the timeout period has expired
Returns the duration for which was waited or an error in case of a timeout or invalid startup notification.
Auto Trait Implementations§
impl Freeze for Server
impl RefUnwindSafe for Server
impl Send for Server
impl Sync for Server
impl Unpin for Server
impl UnwindSafe for Server
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