pub struct Unit {
pub user: bool,
pub name: String,
pub state: UnitState,
pub resctl: UnitResCtl,
pub props: UnitProps,
pub quiet: bool,
}
Fields§
§user: bool
§name: String
§state: UnitState
§resctl: UnitResCtl
§props: UnitProps
§quiet: bool
Implementations§
Source§impl Unit
impl Unit
pub fn new(user: bool, name: String) -> Result<Self>
pub fn new_sys(name: String) -> Result<Self>
pub fn new_user(name: String) -> Result<Self>
pub fn sd_bus(&self) -> &'static LocalKey<RefCell<SystemdDbus>>
pub fn refresh(&mut self) -> Result<()>
pub fn refresh_fields(&mut self)
pub fn resctl_props(&self) -> Vec<(String, PropVariant)>
pub fn apply(&mut self) -> Result<()>
pub fn set_prop(&mut self, key: &str, prop: Prop) -> Result<()>
pub fn stop(&mut self) -> Result<bool>
pub fn stop_and_reset(&mut self) -> Result<()>
pub fn try_start_nowait(&mut self) -> Result<()>
pub fn try_start(&mut self) -> Result<bool>
pub fn restart(&mut self) -> Result<()>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Unit
impl RefUnwindSafe for Unit
impl Send for Unit
impl Sync for Unit
impl Unpin for Unit
impl UnwindSafe for Unit
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more