[][src]Struct openrazer::capabilities::Brightness

pub struct Brightness(_);

Controls a device's brightness.

Implementations

impl Brightness[src]

pub async fn get<'_>(&'_ self) -> Result<f64, Error>[src]

Gets the device's lighting brightness.

pub async fn set<'_>(&'_ self, brightness: f64) -> Result<(), Error>[src]

Sets the device's lighting brightness.

Panics

Panics if brightness is not in range 0.0..=100.0.

pub async fn turn_off<'_>(&'_ self) -> Result<(), Error>[src]

Disables lighting, i.e. sets the brightness to 0.0.

pub async fn full<'_>(&'_ self) -> Result<(), Error>[src]

Sets maximum brightness, 100.0.

Trait Implementations

impl Clone for Brightness[src]

impl Debug for Brightness[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.