pub struct SystemdClient<'a> { /* private fields */ }Implementations§
Source§impl<'a> SystemdClient<'a>
impl<'a> SystemdClient<'a>
Source§impl SystemdClient<'_>
impl SystemdClient<'_>
Sourcepub fn set_pid_prop(&mut self, pid: CgroupPid) -> Result<()>
pub fn set_pid_prop(&mut self, pid: CgroupPid) -> Result<()>
Set the pid to the PIDs property of the unit.
Append a process ID to the PIDs property of the unit. If not exists, one property will be created.
Sourcepub fn start(&self) -> Result<()>
pub fn start(&self) -> Result<()>
Start a slice or a scope unit controlled and supervised by systemd.
For more information, see: https://www.freedesktop.org/software/systemd/man/latest/systemd.unit.html https://www.freedesktop.org/software/systemd/man/latest/systemd.slice.html https://www.freedesktop.org/software/systemd/man/latest/systemd.scope.html
Sourcepub fn stop(&self) -> Result<()>
pub fn stop(&self) -> Result<()>
Stop the current transient unit, the processes will be killed on unit stop, see [1].
- https://www.freedesktop.org/software/systemd/man/latest/systemd.kill.html#KillMode=
Sourcepub fn set_properties(&mut self, properties: &[Property<'static>]) -> Result<()>
pub fn set_properties(&mut self, properties: &[Property<'static>]) -> Result<()>
Set properties for the unit through dbus SetUnitProperties.
Sourcepub fn systemd_version(&self) -> Result<usize>
pub fn systemd_version(&self) -> Result<usize>
Get the systemd version.
Auto Trait Implementations§
impl<'a> Freeze for SystemdClient<'a>
impl<'a> RefUnwindSafe for SystemdClient<'a>
impl<'a> Send for SystemdClient<'a>
impl<'a> Sync for SystemdClient<'a>
impl<'a> Unpin for SystemdClient<'a>
impl<'a> UnwindSafe for SystemdClient<'a>
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