pub struct SharedService { /* private fields */ }Expand description
Shared service manager.
Manages a service that is shared across multiple processes. Uses kernel-level reference counting to track clients.
Implementations§
Sourcepub fn builder(name: &str) -> SharedServiceBuilder
pub fn builder(name: &str) -> SharedServiceBuilder
Create a new builder for SharedService.
Sourcepub async fn acquire(&self) -> Result<ServiceHandle>
pub async fn acquire(&self) -> Result<ServiceHandle>
Acquire a reference to the service.
If this is the first client, on_first_acquire is called to start the service.
Otherwise, the existing service info is returned after health check.
Auto Trait Implementations§
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