pub struct ServiceRegistrationForm<M> { /* private fields */ }Expand description
A single-use registration capability for one started service.
Obtain one form per successfully bound service with
Registar::give_form. Consuming Self::register acknowledges that the
registration is visible in registry snapshots.
Implementations§
Source§impl<M> ServiceRegistrationForm<M>
impl<M> ServiceRegistrationForm<M>
Sourcepub async fn register(
self,
registration: ServiceRegistration<M>,
) -> Result<(), RegistrationError>
pub async fn register( self, registration: ServiceRegistration<M>, ) -> Result<(), RegistrationError>
Inserts a registration and returns only after it is visible to queries.
A caller may treat successful completion as its registry-readiness acknowledgement after binding its listener.
§Errors
Returns RegistrationError::DuplicateBinding when another service is
already registered with the same final binding.
Trait Implementations§
Auto Trait Implementations§
impl<M> !RefUnwindSafe for ServiceRegistrationForm<M>
impl<M> !UnwindSafe for ServiceRegistrationForm<M>
impl<M> Freeze for ServiceRegistrationForm<M>
impl<M> Send for ServiceRegistrationForm<M>where
M: Send,
impl<M> Sync for ServiceRegistrationForm<M>where
M: Send,
impl<M> Unpin for ServiceRegistrationForm<M>
impl<M> UnsafeUnpin for ServiceRegistrationForm<M>
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