pub struct Server { /* private fields */ }Available on crate feature
server only.Expand description
The server struct.
Implementations§
source§impl Server
impl Server
sourcepub fn bind_with(self, wait: impl Fn() -> Result<()>) -> Result<()>
pub fn bind_with(self, wait: impl Fn() -> Result<()>) -> Result<()>
Start the server by running the timer in a dedicated thread as well as all the binders in dedicated threads.
The main thread is then blocked by the given wait closure.
sourcepub fn bind(self) -> Result<()>
pub fn bind(self) -> Result<()>
Wrapper around Server::bind_with where the wait closure
sleeps every second in an infinite loop.
Trait Implementations§
Auto Trait Implementations§
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