pub struct NatsServer { /* private fields */ }Expand description
A service subscribed to its calls, ready to serve.
Implementations§
Source§impl NatsServer
impl NatsServer
Sourcepub async fn serve(self, shutdown: impl Future<Output = ()>) -> Result<()>
pub async fn serve(self, shutdown: impl Future<Output = ()>) -> Result<()>
Answer calls until shutdown completes, then unsubscribe, answer the
calls already delivered and write the last replies. A call NATS
routes here while the unsubscribe is on its way is lost (the client
forgets the subscription once the unsubscribe is sent), and its
caller times out.
Auto Trait Implementations§
impl !Freeze for NatsServer
impl !RefUnwindSafe for NatsServer
impl !UnwindSafe for NatsServer
impl Send for NatsServer
impl Sync for NatsServer
impl Unpin for NatsServer
impl UnsafeUnpin for NatsServer
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