Struct i3status_rs::blocks::bluetooth::Battery1Proxy
source · pub struct Battery1Proxy<'p>(/* private fields */);
Implementations§
source§impl<'p> Battery1Proxy<'p>
impl<'p> Battery1Proxy<'p>
sourcepub async fn new<P>(conn: &Connection, path: P) -> Result<Battery1Proxy<'p>>
pub async fn new<P>(conn: &Connection, path: P) -> Result<Battery1Proxy<'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
.
pub async fn percentage(&self) -> Result<u8>
sourcepub fn cached_percentage(
&self
) -> Result<Option<<Result<u8> as ResultAdapter>::Ok>, <Result<u8> as ResultAdapter>::Err>
pub fn cached_percentage( &self ) -> Result<Option<<Result<u8> as ResultAdapter>::Ok>, <Result<u8> as ResultAdapter>::Err>
Get the cached value of the Percentage
property, or None
if the property is not cached.
sourcepub async fn receive_percentage_changed(
&self
) -> PropertyStream<'p, <Result<u8> as ResultAdapter>::Ok>
pub async fn receive_percentage_changed( &self ) -> PropertyStream<'p, <Result<u8> as ResultAdapter>::Ok>
Create a stream for the Percentage
property changes. This is a convenient wrapper around [zbus::Proxy::receive_property_changed
].
Trait Implementations§
source§impl<'p> AsMut<Proxy<'p>> for Battery1Proxy<'p>
impl<'p> AsMut<Proxy<'p>> for Battery1Proxy<'p>
source§impl<'p> AsRef<Proxy<'p>> for Battery1Proxy<'p>
impl<'p> AsRef<Proxy<'p>> for Battery1Proxy<'p>
source§impl<'p> Clone for Battery1Proxy<'p>
impl<'p> Clone for Battery1Proxy<'p>
source§fn clone(&self) -> Battery1Proxy<'p>
fn clone(&self) -> Battery1Proxy<'p>
Returns a copy 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 Battery1Proxy<'p>
impl<'p> Debug for Battery1Proxy<'p>
source§impl<'p> From<Proxy<'p>> for Battery1Proxy<'p>
impl<'p> From<Proxy<'p>> for Battery1Proxy<'p>
source§impl<'a> ProxyDefault for Battery1Proxy<'a>
impl<'a> ProxyDefault for Battery1Proxy<'a>
source§impl<'p> ProxyImpl<'p> for Battery1Proxy<'p>
impl<'p> ProxyImpl<'p> for Battery1Proxy<'p>
source§impl<'p> Serialize for Battery1Proxy<'p>
impl<'p> Serialize for Battery1Proxy<'p>
Auto Trait Implementations§
impl<'p> Freeze for Battery1Proxy<'p>
impl<'p> !RefUnwindSafe for Battery1Proxy<'p>
impl<'p> Send for Battery1Proxy<'p>
impl<'p> Sync for Battery1Proxy<'p>
impl<'p> Unpin for Battery1Proxy<'p>
impl<'p> !UnwindSafe for Battery1Proxy<'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
§impl<T> DynamicType for Twhere
T: Type + ?Sized,
impl<T> DynamicType for Twhere
T: Type + ?Sized,
§fn dynamic_signature(&self) -> Signature<'_>
fn dynamic_signature(&self) -> Signature<'_>
Get the signature for the implementing type. Read more