pub struct CallbackManagedService { /* private fields */ }Expand description
Managed adapter for an embedded resource controlled by callbacks.
Implementations§
Source§impl CallbackManagedService
impl CallbackManagedService
Sourcepub fn new<S, T, H>(
descriptor: ServiceDescriptor,
start_action: S,
stop_action: T,
health_probe: H,
) -> Self
pub fn new<S, T, H>( descriptor: ServiceDescriptor, start_action: S, stop_action: T, health_probe: H, ) -> Self
Creates a restartable embedded service.
Trait Implementations§
Source§impl ManagedService for CallbackManagedService
impl ManagedService for CallbackManagedService
Source§fn descriptor(&self) -> &ServiceDescriptor
fn descriptor(&self) -> &ServiceDescriptor
Returns immutable identity, dependencies, resource, and policy.
Source§fn start(&self) -> SupervisorResult<()>
fn start(&self) -> SupervisorResult<()>
Starts the service and its bounded resources.
Source§fn stop(&self, timeout: Duration) -> SupervisorResult<()>
fn stop(&self, timeout: Duration) -> SupervisorResult<()>
Requests cooperative shutdown inside
timeout.Source§fn health(&self) -> ServiceHealth
fn health(&self) -> ServiceHealth
Returns current service health.
Source§fn runtime_state(&self) -> ServiceRuntimeState
fn runtime_state(&self) -> ServiceRuntimeState
Returns the concrete service execution state.
Auto Trait Implementations§
impl !Freeze for CallbackManagedService
impl !RefUnwindSafe for CallbackManagedService
impl !UnwindSafe for CallbackManagedService
impl Send for CallbackManagedService
impl Sync for CallbackManagedService
impl Unpin for CallbackManagedService
impl UnsafeUnpin for CallbackManagedService
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