Struct systemd_run::Identity
source · pub struct Identity(/* private fields */);
Expand description
The identity for running a transient service on the system service manager.
Implementations§
source§impl Identity
impl Identity
sourcepub fn user_group<U: AsRef<str>, G: AsRef<str>>(u: U, g: G) -> Self
pub fn user_group<U: AsRef<str>, G: AsRef<str>>(u: U, g: G) -> Self
Run the transient service as the the UNIX user x
and group y
for UserGroup(x, y)
.
You need to be the root
user to start a transient service with
this. Read User=
and Group=
in
systemd.exec(5)
for details.
sourcepub fn dynamic() -> Self
pub fn dynamic() -> Self
Run the transient service as a UNIX user and group pair dynamically allocated.
This is unavailable if the feature systemd_231
is disabled.
You need to be the root
user to start a transient service with
this. Read DynamicUser=
in
systemd.exec(5)
for details.
Auto Trait Implementations§
impl RefUnwindSafe for Identity
impl Send for Identity
impl Sync for Identity
impl Unpin for Identity
impl UnwindSafe for Identity
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