pub struct DaemonHandle { /* private fields */ }Expand description
Handle to a running daemon instance.
The handle type varies by platform:
- Linux/systemd: Unit name
- macOS/launchd: Service label
- Container: Container ID
- pepita: VM ID + vsock transport
- WOS: Process ID
Implementations§
Source§impl DaemonHandle
impl DaemonHandle
Sourcepub fn container(
id: DaemonId,
runtime: impl Into<String>,
container_id: impl Into<String>,
) -> Self
pub fn container( id: DaemonId, runtime: impl Into<String>, container_id: impl Into<String>, ) -> Self
Creates a container handle.
Sourcepub fn pepita(id: DaemonId, vm_id: impl Into<String>, vsock_cid: u32) -> Self
pub fn pepita(id: DaemonId, vm_id: impl Into<String>, vsock_cid: u32) -> Self
Creates a pepita handle.
Sourcepub const fn handle_data(&self) -> &HandleData
pub const fn handle_data(&self) -> &HandleData
Returns the handle data.
Sourcepub fn systemd_unit(&self) -> Option<&str>
pub fn systemd_unit(&self) -> Option<&str>
Returns the systemd unit name, if applicable.
Sourcepub fn launchd_label(&self) -> Option<&str>
pub fn launchd_label(&self) -> Option<&str>
Returns the launchd label, if applicable.
Sourcepub fn container_id(&self) -> Option<&str>
pub fn container_id(&self) -> Option<&str>
Returns the container ID, if applicable.
Source§impl DaemonHandle
impl DaemonHandle
Sourcepub fn pepita_vm_id(&self) -> Option<&str>
pub fn pepita_vm_id(&self) -> Option<&str>
Returns the pepita VM ID, if applicable.
Trait Implementations§
Source§impl Clone for DaemonHandle
impl Clone for DaemonHandle
Source§fn clone(&self) -> DaemonHandle
fn clone(&self) -> DaemonHandle
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DaemonHandle
impl Debug for DaemonHandle
Source§impl<'de> Deserialize<'de> for DaemonHandle
impl<'de> Deserialize<'de> for DaemonHandle
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for DaemonHandle
impl Display for DaemonHandle
Auto Trait Implementations§
impl Freeze for DaemonHandle
impl RefUnwindSafe for DaemonHandle
impl Send for DaemonHandle
impl Sync for DaemonHandle
impl Unpin for DaemonHandle
impl UnwindSafe for DaemonHandle
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