pub trait Brightness {
// Required methods
fn device_name(&self) -> impl Future<Output = Result<String, Error>> + Send;
fn friendly_device_name(
&self,
) -> impl Future<Output = Result<String, Error>> + Send;
fn get(&self) -> impl Future<Output = Result<u32, Error>> + Send;
fn set(
&mut self,
percentage: u32,
) -> impl Future<Output = Result<(), Error>> + Send;
}
Available on crate feature
async
only.Expand description
Async interface to get and set brightness.
Required Methods§
Sourcefn device_name(&self) -> impl Future<Output = Result<String, Error>> + Send
fn device_name(&self) -> impl Future<Output = Result<String, Error>> + Send
Returns the device name.
Sourcefn friendly_device_name(
&self,
) -> impl Future<Output = Result<String, Error>> + Send
fn friendly_device_name( &self, ) -> impl Future<Output = Result<String, Error>> + Send
Returns a human-readable device name suitable for display to users,
which may differ from the technical device identifier returned by device_name
.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.