pub struct ManagerProxy<'p>(/* private fields */);Expand description
Proxy object for org.freedesktop.systemd1.Manager.
Partially taken from https://github.com/lucab/zbus_systemd/blob/main/src/systemd1/generated.rs
Implementations§
Source§impl<'p> ManagerProxy<'p>
impl<'p> ManagerProxy<'p>
Sourcepub async fn new(conn: &Connection) -> Result<ManagerProxy<'p>>
pub async fn new(conn: &Connection) -> Result<ManagerProxy<'p>>
Creates a new proxy with the default service and path.
Sourcepub fn builder(conn: &Connection) -> Builder<'p, Self>
pub fn builder(conn: &Connection) -> Builder<'p, Self>
Returns a customizable builder for this proxy.
Sourcepub fn into_inner(self) -> Proxy<'p>
pub fn into_inner(self) -> Proxy<'p>
Consumes self, returning the underlying zbus::Proxy.
Sourcepub fn inner_mut(&mut self) -> &mut Proxy<'p>
pub fn inner_mut(&mut self) -> &mut Proxy<'p>
The mutable reference to the underlying zbus::Proxy.
Sourcepub async fn start_unit(
&self,
name: String,
mode: String,
) -> Result<OwnedObjectPath>
pub async fn start_unit( &self, name: String, mode: String, ) -> Result<OwnedObjectPath>
📖 Call interface method StartUnit.
Sourcepub async fn stop_unit(
&self,
name: String,
mode: String,
) -> Result<OwnedObjectPath>
pub async fn stop_unit( &self, name: String, mode: String, ) -> Result<OwnedObjectPath>
📖 Call interface method StopUnit.
Sourcepub async fn reload_unit(
&self,
name: String,
mode: String,
) -> Result<OwnedObjectPath>
pub async fn reload_unit( &self, name: String, mode: String, ) -> Result<OwnedObjectPath>
📖 Call interface method ReloadUnit.
Sourcepub async fn restart_unit(
&self,
name: String,
mode: String,
) -> Result<OwnedObjectPath>
pub async fn restart_unit( &self, name: String, mode: String, ) -> Result<OwnedObjectPath>
📖 Call interface method RestartUnit.
Sourcepub async fn enable_unit_files(
&self,
files: Vec<String>,
runtime: bool,
force: bool,
) -> Result<(bool, Vec<(String, String, String)>)>
pub async fn enable_unit_files( &self, files: Vec<String>, runtime: bool, force: bool, ) -> Result<(bool, Vec<(String, String, String)>)>
📖 Call interface method EnableUnitFiles.
Sourcepub async fn disable_unit_files(
&self,
files: Vec<String>,
runtime: bool,
) -> Result<Vec<(String, String, String)>>
pub async fn disable_unit_files( &self, files: Vec<String>, runtime: bool, ) -> Result<Vec<(String, String, String)>>
📖 Call interface method DisableUnitFiles.
Sourcepub async fn list_units(
&self,
) -> Result<Vec<(String, String, String, String, String, String, OwnedObjectPath, u32, String, OwnedObjectPath)>>
pub async fn list_units( &self, ) -> Result<Vec<(String, String, String, String, String, String, OwnedObjectPath, u32, String, OwnedObjectPath)>>
📖 Call interface method ListUnits.
Trait Implementations§
Source§impl<'p> AsMut<Proxy<'p>> for ManagerProxy<'p>
impl<'p> AsMut<Proxy<'p>> for ManagerProxy<'p>
Source§impl<'p> AsRef<Proxy<'p>> for ManagerProxy<'p>
impl<'p> AsRef<Proxy<'p>> for ManagerProxy<'p>
Source§impl<'p> Clone for ManagerProxy<'p>
impl<'p> Clone for ManagerProxy<'p>
Source§fn clone(&self) -> ManagerProxy<'p>
fn clone(&self) -> ManagerProxy<'p>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'p> Debug for ManagerProxy<'p>
impl<'p> Debug for ManagerProxy<'p>
Source§impl<'a> Defaults for ManagerProxy<'a>
impl<'a> Defaults for ManagerProxy<'a>
const INTERFACE: &'static Option<InterfaceName<'static>>
const DESTINATION: &'static Option<BusName<'static>>
const PATH: &'static Option<ObjectPath<'static>>
Source§impl<'p> From<Proxy<'p>> for ManagerProxy<'p>
impl<'p> From<Proxy<'p>> for ManagerProxy<'p>
Source§impl<'p> ProxyImpl<'p> for ManagerProxy<'p>
impl<'p> ProxyImpl<'p> for ManagerProxy<'p>
Source§impl<'p> Serialize for ManagerProxy<'p>
impl<'p> Serialize for ManagerProxy<'p>
Auto Trait Implementations§
impl<'p> Freeze for ManagerProxy<'p>
impl<'p> !RefUnwindSafe for ManagerProxy<'p>
impl<'p> Send for ManagerProxy<'p>
impl<'p> Sync for ManagerProxy<'p>
impl<'p> Unpin for ManagerProxy<'p>
impl<'p> !UnwindSafe for ManagerProxy<'p>
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> DynamicType for T
impl<T> DynamicType for T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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