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 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