pub struct ServiceHandle {
pub service_id: ServiceId,
pub instance_id: InstanceId,
/* private fields */
}Expand description
Handle for managing a service instance lifecycle
Fields§
§service_id: ServiceId§instance_id: InstanceIdImplementations§
Source§impl ServiceHandle
impl ServiceHandle
Sourcepub fn new(service_id: ServiceId, instance_id: InstanceId) -> Self
pub fn new(service_id: ServiceId, instance_id: InstanceId) -> Self
Create a new ServiceHandle in the Idle state.
Sourcepub fn state(&self) -> &ServiceState
pub fn state(&self) -> &ServiceState
Return the current state of this handle.
Sourcepub fn set_state(&mut self, state: ServiceState)
pub fn set_state(&mut self, state: ServiceState)
Transition to a new state.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ServiceHandle
impl RefUnwindSafe for ServiceHandle
impl Send for ServiceHandle
impl Sync for ServiceHandle
impl Unpin for ServiceHandle
impl UnsafeUnpin for ServiceHandle
impl UnwindSafe for ServiceHandle
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