pub struct Service { /* private fields */ }Expand description
Handle to a registered service.
Dropping the handle implicitly unregisters the service: it is flagged cancelled and the driver’s post-pump sweep begins the endpoint-owned RFC 6762 §10.1 withdrawal — the endpoint holds the route (reserving the name) while it multicasts the TTL=0 goodbye a few times, then frees the route.
Implementations§
Source§impl Service
impl Service
Sourcepub const fn handle(&self) -> ServiceHandle
pub const fn handle(&self) -> ServiceHandle
The underlying proto-layer ServiceHandle for this registration.
Sourcepub async fn next(&self) -> Option<ServiceUpdate>
pub async fn next(&self) -> Option<ServiceUpdate>
Wait for the next ServiceUpdate event, or None once the service has
been retired (terminal delivered) or the driver task exited.
Drains the handle-owned mailbox: non-terminal updates first (FIFO), then the
reserved terminal, then end-of-stream. Mirrors crate::Query::next’s
wakeup discipline — a brief synchronous borrow, then a park on the shared
driver notifier when nothing is ready.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Service
impl !Send for Service
impl !Sync for Service
impl !UnwindSafe for Service
impl Freeze for Service
impl Unpin for Service
impl UnsafeUnpin for Service
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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>
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>
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