pub struct Unit {
pub user: bool,
pub name: String,
pub state: US,
pub resctl: UnitResCtl,
pub props: UnitProps,
pub quiet: bool,
}Fields
user: boolname: Stringstate: USresctl: UnitResCtlprops: UnitPropsquiet: boolImplementations
sourceimpl 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)>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more