pub struct PpdProxyBlocking<'p>(/* private fields */);Expand description
Power Profiles Daemon D-Bus interface
This trait defines all the methods, signals, and properties available through the Power Profiles Daemon D-Bus interface. It’s automatically implemented for proxy objects.
Implementations§
Source§impl<'p> PpdProxyBlocking<'p>
impl<'p> PpdProxyBlocking<'p>
Sourcepub fn new(conn: &Connection) -> Result<PpdProxyBlocking<'p>>
pub fn new(conn: &Connection) -> Result<PpdProxyBlocking<'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 fn hold_profile(
&self,
profile: String,
reason: String,
application_id: String,
) -> ZbusResult<u32>
pub fn hold_profile( &self, profile: String, reason: String, application_id: String, ) -> ZbusResult<u32>
Sourcepub fn release_profile(&self, cookie: u32) -> ZbusResult<()>
pub fn release_profile(&self, cookie: u32) -> ZbusResult<()>
Release a previously requested profile hold
§Arguments
cookie- The cookie returned from a previous hold_profile call
Sourcepub fn set_action_enabled(
&self,
action: String,
enabled: bool,
) -> ZbusResult<()>
pub fn set_action_enabled( &self, action: String, enabled: bool, ) -> ZbusResult<()>
Enable or disable a specific action
§Arguments
action- The name of the action to configureenabled- Whether to enable or disable the action
Sourcepub fn receive_profile_released(&self) -> Result<ProfileReleasedIterator>
pub fn receive_profile_released(&self) -> Result<ProfileReleasedIterator>
Create a stream that receives ProfileReleased signals.
This a convenient wrapper around zbus::blocking::Proxy::receive_signal.
Signal emitted when a profile is released
§Returns
The cookie of the released profile hold
Sourcepub fn active_profile(&self) -> ZbusResult<String>
pub fn active_profile(&self) -> ZbusResult<String>
Sourcepub fn cached_active_profile(
&self,
) -> Result<Option<<ZbusResult<String> as ResultAdapter>::Ok>, <ZbusResult<String> as ResultAdapter>::Err>
pub fn cached_active_profile( &self, ) -> Result<Option<<ZbusResult<String> as ResultAdapter>::Ok>, <ZbusResult<String> as ResultAdapter>::Err>
Get the cached value of the ActiveProfile property, or None if the property is not cached.
Sourcepub fn receive_active_profile_changed(
&self,
) -> PropertyIterator<'p, <ZbusResult<String> as ResultAdapter>::Ok>
pub fn receive_active_profile_changed( &self, ) -> PropertyIterator<'p, <ZbusResult<String> as ResultAdapter>::Ok>
Create a stream for the ActiveProfile property changes. This is a convenient wrapper around zbus::blocking::Proxy::receive_property_changed.
Sourcepub fn set_active_profile(&self, string: String) -> ZbusResult<()>
pub fn set_active_profile(&self, string: String) -> ZbusResult<()>
Sourcepub fn performance_inhibited(&self) -> ZbusResult<String>
pub fn performance_inhibited(&self) -> ZbusResult<String>
Get information about why performance might be inhibited
§Returns
A string describing why performance is inhibited, or empty if not inhibited
Sourcepub fn cached_performance_inhibited(
&self,
) -> Result<Option<<ZbusResult<String> as ResultAdapter>::Ok>, <ZbusResult<String> as ResultAdapter>::Err>
pub fn cached_performance_inhibited( &self, ) -> Result<Option<<ZbusResult<String> as ResultAdapter>::Ok>, <ZbusResult<String> as ResultAdapter>::Err>
Get the cached value of the PerformanceInhibited property, or None if the property is not cached.
Sourcepub fn receive_performance_inhibited_changed(
&self,
) -> PropertyIterator<'p, <ZbusResult<String> as ResultAdapter>::Ok>
pub fn receive_performance_inhibited_changed( &self, ) -> PropertyIterator<'p, <ZbusResult<String> as ResultAdapter>::Ok>
Create a stream for the PerformanceInhibited property changes. This is a convenient wrapper around zbus::blocking::Proxy::receive_property_changed.
Sourcepub fn performance_degraded(&self) -> ZbusResult<Optional<String>>
pub fn performance_degraded(&self) -> ZbusResult<Optional<String>>
Get information about why performance might be degraded
§Returns
An optional string describing why performance is degraded, or None if not degraded
Sourcepub fn cached_performance_degraded(
&self,
) -> Result<Option<<ZbusResult<Optional<String>> as ResultAdapter>::Ok>, <ZbusResult<Optional<String>> as ResultAdapter>::Err>
pub fn cached_performance_degraded( &self, ) -> Result<Option<<ZbusResult<Optional<String>> as ResultAdapter>::Ok>, <ZbusResult<Optional<String>> as ResultAdapter>::Err>
Get the cached value of the PerformanceDegraded property, or None if the property is not cached.
Sourcepub fn receive_performance_degraded_changed(
&self,
) -> PropertyIterator<'p, <ZbusResult<Optional<String>> as ResultAdapter>::Ok>
pub fn receive_performance_degraded_changed( &self, ) -> PropertyIterator<'p, <ZbusResult<Optional<String>> as ResultAdapter>::Ok>
Create a stream for the PerformanceDegraded property changes. This is a convenient wrapper around zbus::blocking::Proxy::receive_property_changed.
Sourcepub fn profiles(&self) -> ZbusResult<Vec<Profile>>
pub fn profiles(&self) -> ZbusResult<Vec<Profile>>
Sourcepub fn cached_profiles(
&self,
) -> Result<Option<<ZbusResult<Vec<Profile>> as ResultAdapter>::Ok>, <ZbusResult<Vec<Profile>> as ResultAdapter>::Err>
pub fn cached_profiles( &self, ) -> Result<Option<<ZbusResult<Vec<Profile>> as ResultAdapter>::Ok>, <ZbusResult<Vec<Profile>> as ResultAdapter>::Err>
Get the cached value of the Profiles property, or None if the property is not cached.
Sourcepub fn receive_profiles_changed(
&self,
) -> PropertyIterator<'p, <ZbusResult<Vec<Profile>> as ResultAdapter>::Ok>
pub fn receive_profiles_changed( &self, ) -> PropertyIterator<'p, <ZbusResult<Vec<Profile>> as ResultAdapter>::Ok>
Create a stream for the Profiles property changes. This is a convenient wrapper around zbus::blocking::Proxy::receive_property_changed.
Sourcepub fn actions(&self) -> ZbusResult<Vec<String>>
pub fn actions(&self) -> ZbusResult<Vec<String>>
Sourcepub fn cached_actions(
&self,
) -> Result<Option<<ZbusResult<Vec<String>> as ResultAdapter>::Ok>, <ZbusResult<Vec<String>> as ResultAdapter>::Err>
pub fn cached_actions( &self, ) -> Result<Option<<ZbusResult<Vec<String>> as ResultAdapter>::Ok>, <ZbusResult<Vec<String>> as ResultAdapter>::Err>
Get the cached value of the Actions property, or None if the property is not cached.
Sourcepub fn receive_actions_changed(
&self,
) -> PropertyIterator<'p, <ZbusResult<Vec<String>> as ResultAdapter>::Ok>
pub fn receive_actions_changed( &self, ) -> PropertyIterator<'p, <ZbusResult<Vec<String>> as ResultAdapter>::Ok>
Create a stream for the Actions property changes. This is a convenient wrapper around zbus::blocking::Proxy::receive_property_changed.
Sourcepub fn version(&self) -> ZbusResult<String>
pub fn version(&self) -> ZbusResult<String>
Sourcepub fn cached_version(
&self,
) -> Result<Option<<ZbusResult<String> as ResultAdapter>::Ok>, <ZbusResult<String> as ResultAdapter>::Err>
pub fn cached_version( &self, ) -> Result<Option<<ZbusResult<String> as ResultAdapter>::Ok>, <ZbusResult<String> as ResultAdapter>::Err>
Get the cached value of the Version property, or None if the property is not cached.
Sourcepub fn receive_version_changed(
&self,
) -> PropertyIterator<'p, <ZbusResult<String> as ResultAdapter>::Ok>
pub fn receive_version_changed( &self, ) -> PropertyIterator<'p, <ZbusResult<String> as ResultAdapter>::Ok>
Create a stream for the Version property changes. This is a convenient wrapper around zbus::blocking::Proxy::receive_property_changed.
Sourcepub fn actions_info(&self) -> ZbusResult<Vec<Action>>
pub fn actions_info(&self) -> ZbusResult<Vec<Action>>
Sourcepub fn cached_actions_info(
&self,
) -> Result<Option<<ZbusResult<Vec<Action>> as ResultAdapter>::Ok>, <ZbusResult<Vec<Action>> as ResultAdapter>::Err>
pub fn cached_actions_info( &self, ) -> Result<Option<<ZbusResult<Vec<Action>> as ResultAdapter>::Ok>, <ZbusResult<Vec<Action>> as ResultAdapter>::Err>
Get the cached value of the ActionsInfo property, or None if the property is not cached.
Sourcepub fn receive_actions_info_changed(
&self,
) -> PropertyIterator<'p, <ZbusResult<Vec<Action>> as ResultAdapter>::Ok>
pub fn receive_actions_info_changed( &self, ) -> PropertyIterator<'p, <ZbusResult<Vec<Action>> as ResultAdapter>::Ok>
Create a stream for the ActionsInfo property changes. This is a convenient wrapper around zbus::blocking::Proxy::receive_property_changed.
Sourcepub fn active_profile_holds(&self) -> ZbusResult<Vec<ActiveHold>>
pub fn active_profile_holds(&self) -> ZbusResult<Vec<ActiveHold>>
Sourcepub fn cached_active_profile_holds(
&self,
) -> Result<Option<<ZbusResult<Vec<ActiveHold>> as ResultAdapter>::Ok>, <ZbusResult<Vec<ActiveHold>> as ResultAdapter>::Err>
pub fn cached_active_profile_holds( &self, ) -> Result<Option<<ZbusResult<Vec<ActiveHold>> as ResultAdapter>::Ok>, <ZbusResult<Vec<ActiveHold>> as ResultAdapter>::Err>
Get the cached value of the ActiveProfileHolds property, or None if the property is not cached.
Sourcepub fn receive_active_profile_holds_changed(
&self,
) -> PropertyIterator<'p, <ZbusResult<Vec<ActiveHold>> as ResultAdapter>::Ok>
pub fn receive_active_profile_holds_changed( &self, ) -> PropertyIterator<'p, <ZbusResult<Vec<ActiveHold>> as ResultAdapter>::Ok>
Create a stream for the ActiveProfileHolds property changes. This is a convenient wrapper around zbus::blocking::Proxy::receive_property_changed.
Sourcepub fn battery_aware(&self) -> ZbusResult<bool>
pub fn battery_aware(&self) -> ZbusResult<bool>
Check if battery-aware behavior is enabled
When enabled, the system may automatically adjust profiles based on power source
§Returns
True if battery-aware behavior is enabled
Sourcepub fn cached_battery_aware(
&self,
) -> Result<Option<<ZbusResult<bool> as ResultAdapter>::Ok>, <ZbusResult<bool> as ResultAdapter>::Err>
pub fn cached_battery_aware( &self, ) -> Result<Option<<ZbusResult<bool> as ResultAdapter>::Ok>, <ZbusResult<bool> as ResultAdapter>::Err>
Get the cached value of the BatteryAware property, or None if the property is not cached.
Sourcepub fn receive_battery_aware_changed(
&self,
) -> PropertyIterator<'p, <ZbusResult<bool> as ResultAdapter>::Ok>
pub fn receive_battery_aware_changed( &self, ) -> PropertyIterator<'p, <ZbusResult<bool> as ResultAdapter>::Ok>
Create a stream for the BatteryAware property changes. This is a convenient wrapper around zbus::blocking::Proxy::receive_property_changed.
Sourcepub fn set_battery_aware(&self, value: bool) -> ZbusResult<()>
pub fn set_battery_aware(&self, value: bool) -> ZbusResult<()>
Configure battery-aware behavior
§Arguments
value- True to enable, false to disable battery-aware behavior
Trait Implementations§
Source§impl<'p> AsMut<Proxy<'p>> for PpdProxyBlocking<'p>
impl<'p> AsMut<Proxy<'p>> for PpdProxyBlocking<'p>
Source§impl<'p> AsRef<Proxy<'p>> for PpdProxyBlocking<'p>
impl<'p> AsRef<Proxy<'p>> for PpdProxyBlocking<'p>
Source§impl<'p> Clone for PpdProxyBlocking<'p>
impl<'p> Clone for PpdProxyBlocking<'p>
Source§fn clone(&self) -> PpdProxyBlocking<'p>
fn clone(&self) -> PpdProxyBlocking<'p>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more