pub struct BrightnessControlFeature { /* private fields */ }Expand description
Implements the BrightnessControl / 0x8040 feature.
Implementations§
Source§impl BrightnessControlFeature
impl BrightnessControlFeature
Sourcepub async fn get_info(&self) -> Result<BrightnessInfo, Hidpp20Error>
pub async fn get_info(&self) -> Result<BrightnessInfo, Hidpp20Error>
Retrieves brightness range and capability information.
Sourcepub async fn get_brightness(&self) -> Result<u16, Hidpp20Error>
pub async fn get_brightness(&self) -> Result<u16, Hidpp20Error>
Retrieves the current brightness value.
Sourcepub async fn set_brightness(&self, brightness: u16) -> Result<(), Hidpp20Error>
pub async fn set_brightness(&self, brightness: u16) -> Result<(), Hidpp20Error>
Sets the current brightness value.
Sourcepub async fn get_illumination(&self) -> Result<bool, Hidpp20Error>
pub async fn get_illumination(&self) -> Result<bool, Hidpp20Error>
Retrieves whether illumination is currently enabled.
Sourcepub async fn set_illumination(&self, enabled: bool) -> Result<(), Hidpp20Error>
pub async fn set_illumination(&self, enabled: bool) -> Result<(), Hidpp20Error>
Enables or disables illumination.
Trait Implementations§
Source§impl Clone for BrightnessControlFeature
impl Clone for BrightnessControlFeature
Source§fn clone(&self) -> BrightnessControlFeature
fn clone(&self) -> BrightnessControlFeature
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl CreatableFeature for BrightnessControlFeature
impl CreatableFeature for BrightnessControlFeature
Source§const STARTING_VERSION: u8 = 1
const STARTING_VERSION: u8 = 1
The version of the feature the implementation starts to support.
impl Feature for BrightnessControlFeature
Auto Trait Implementations§
impl !RefUnwindSafe for BrightnessControlFeature
impl !UnwindSafe for BrightnessControlFeature
impl Freeze for BrightnessControlFeature
impl Send for BrightnessControlFeature
impl Sync for BrightnessControlFeature
impl Unpin for BrightnessControlFeature
impl UnsafeUnpin for BrightnessControlFeature
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