pub struct ServiceRegistration { /* private fields */ }Expand description
Reference to a registered service instance.
The service will be automatically unregistered when this value is dropped.
Implementations§
Source§impl ServiceRegistration
impl ServiceRegistration
Sourcepub async fn unregister(self) -> Result<(), String>
pub async fn unregister(self) -> Result<(), String>
Unregisters the service, notifying remote clients that the service is no longer available.
Use this method instead of dropping the ServiceRegistration if you want to be notified of
any errors that occur during unregistration.
Trait Implementations§
Source§impl Drop for ServiceRegistration
impl Drop for ServiceRegistration
Auto Trait Implementations§
impl Freeze for ServiceRegistration
impl !RefUnwindSafe for ServiceRegistration
impl Send for ServiceRegistration
impl Sync for ServiceRegistration
impl Unpin for ServiceRegistration
impl UnsafeUnpin for ServiceRegistration
impl !UnwindSafe for ServiceRegistration
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