pub struct ServiceRegistration<M> { /* private fields */ }Expand description
Immutable data reported by a started local service.
Metadata belongs to the application that uses the registry. The registry does not assign semantics to it.
Implementations§
Source§impl<M> ServiceRegistration<M>
impl<M> ServiceRegistration<M>
pub fn new( service_binding: ServiceBinding, metadata: M, health_check: Option<FnSpawnServiceHeathCheck>, ) -> Self
pub fn service_binding(&self) -> &ServiceBinding
pub fn metadata(&self) -> &M
pub fn spawn_check(&self) -> Option<ServiceHealthCheckJob>
Trait Implementations§
Source§impl<M: Clone> Clone for ServiceRegistration<M>
impl<M: Clone> Clone for ServiceRegistration<M>
Source§fn clone(&self) -> ServiceRegistration<M>
fn clone(&self) -> ServiceRegistration<M>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl<M> Freeze for ServiceRegistration<M>where
M: Freeze,
impl<M> RefUnwindSafe for ServiceRegistration<M>where
M: RefUnwindSafe,
impl<M> Send for ServiceRegistration<M>where
M: Send,
impl<M> Sync for ServiceRegistration<M>where
M: Sync,
impl<M> Unpin for ServiceRegistration<M>where
M: Unpin,
impl<M> UnsafeUnpin for ServiceRegistration<M>where
M: UnsafeUnpin,
impl<M> UnwindSafe for ServiceRegistration<M>where
M: UnwindSafe,
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