openrazer 0.1.0

Asynchronous bindings to the OpenRazer daemon.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use super::CapabilityBase;
use crate::Error;

/// Controls the spectrum effect.
#[derive(Debug, Clone)]
pub struct SpectrumEffect(pub(crate) CapabilityBase);

impl SpectrumEffect {
    pub(crate) const INTERFACE: &'static str = "razer.device.lighting.chroma";
    pub(crate) const METHOD: &'static str = "setSpectrum";

    /// Sets the spectrum effect.
    pub async fn set(&self) -> Result<(), Error> {
        self.0
            .call_set_method(Self::INTERFACE, Self::METHOD, vec![])
            .await
    }
}