pub struct UnitProxy<'p>(/* private fields */);Expand description
Proxy object for org.freedesktop.systemd1.Unit.
Taken from https://github.com/lucab/zbus_systemd/blob/main/src/systemd1/generated.rs
Implementations§
Source§impl<'p> UnitProxy<'p>
impl<'p> UnitProxy<'p>
Sourcepub async fn new<P>(conn: &Connection, path: P) -> Result<UnitProxy<'p>>
pub async fn new<P>(conn: &Connection, path: P) -> Result<UnitProxy<'p>>
Creates a new proxy with the given path, and the default destination.
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 active_state(&self) -> Result<String>
pub async fn active_state(&self) -> Result<String>
Get property ActiveState.
Sourcepub fn cached_active_state(
&self,
) -> Result<Option<<Result<String> as ResultAdapter>::Ok>, <Result<String> as ResultAdapter>::Err>
pub fn cached_active_state( &self, ) -> Result<Option<<Result<String> as ResultAdapter>::Ok>, <Result<String> as ResultAdapter>::Err>
Get property ActiveState.
Get the cached value of the ActiveState property, or None if the property is not cached.
Sourcepub async fn receive_active_state_changed(
&self,
) -> PropertyStream<'p, <Result<String> as ResultAdapter>::Ok>
pub async fn receive_active_state_changed( &self, ) -> PropertyStream<'p, <Result<String> as ResultAdapter>::Ok>
Get property ActiveState.
Create a stream for the ActiveState property changes. This is a convenient wrapper around zbus::Proxy::receive_property_changed.
Sourcepub async fn load_state(&self) -> Result<String>
pub async fn load_state(&self) -> Result<String>
Get property LoadState.
Sourcepub fn cached_load_state(
&self,
) -> Result<Option<<Result<String> as ResultAdapter>::Ok>, <Result<String> as ResultAdapter>::Err>
pub fn cached_load_state( &self, ) -> Result<Option<<Result<String> as ResultAdapter>::Ok>, <Result<String> as ResultAdapter>::Err>
Get property LoadState.
Get the cached value of the LoadState property, or None if the property is not cached.
Sourcepub async fn receive_load_state_changed(
&self,
) -> PropertyStream<'p, <Result<String> as ResultAdapter>::Ok>
pub async fn receive_load_state_changed( &self, ) -> PropertyStream<'p, <Result<String> as ResultAdapter>::Ok>
Get property LoadState.
Create a stream for the LoadState property changes. This is a convenient wrapper around zbus::Proxy::receive_property_changed.
Sourcepub async fn unit_file_state(&self) -> Result<String>
pub async fn unit_file_state(&self) -> Result<String>
Get property UnitFileState.
Sourcepub fn cached_unit_file_state(
&self,
) -> Result<Option<<Result<String> as ResultAdapter>::Ok>, <Result<String> as ResultAdapter>::Err>
pub fn cached_unit_file_state( &self, ) -> Result<Option<<Result<String> as ResultAdapter>::Ok>, <Result<String> as ResultAdapter>::Err>
Get property UnitFileState.
Get the cached value of the UnitFileState property, or None if the property is not cached.
Sourcepub async fn receive_unit_file_state_changed(
&self,
) -> PropertyStream<'p, <Result<String> as ResultAdapter>::Ok>
pub async fn receive_unit_file_state_changed( &self, ) -> PropertyStream<'p, <Result<String> as ResultAdapter>::Ok>
Get property UnitFileState.
Create a stream for the UnitFileState property changes. This is a convenient wrapper around zbus::Proxy::receive_property_changed.
Trait Implementations§
Source§impl<'a> Defaults for UnitProxy<'a>
impl<'a> Defaults for UnitProxy<'a>
const INTERFACE: &'static Option<InterfaceName<'static>>
const DESTINATION: &'static Option<BusName<'static>>
const PATH: &'static Option<ObjectPath<'static>>
Auto Trait Implementations§
impl<'p> Freeze for UnitProxy<'p>
impl<'p> !RefUnwindSafe for UnitProxy<'p>
impl<'p> Send for UnitProxy<'p>
impl<'p> Sync for UnitProxy<'p>
impl<'p> Unpin for UnitProxy<'p>
impl<'p> !UnwindSafe for UnitProxy<'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
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>
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>
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