[−][src]Enum openrazer::devices::Device
A Razer device, possibly a specific one.
This enum represents some Razer device. It has methods for each capability (e.g. brightness, effects and keyboard layout), but these methods check that the capability is present, because they operate on an unkonwn device. If it is, then a special struct, which controls the capatibily, is returned.
This crate also has types for specific devices, e.g. Razer Hunstman. If the
underlying device is known to this crate, it will construct a variant for
this speicifc device, e.g. Device::Huntsman
instead of Device::Other
for yet unknown devices. You can match on this enum and use a type-safer
API that knows the device's capabilities, e.g. trying to set DPI for
a keyboard will result in a compile-time error.
Variants
Huntsman(Huntsman)
A Razer Huntsman keyboard.
Other(GenericDevice)
A device unknown to this crate.
Implementations
impl Device
[src]
pub fn breath_effect(&self) -> Option<BreathEffect>
[src]
Controls the breath effect.
pub fn custom_effect(&self) -> Option<CustomEffect>
[src]
Controls the custom effect.
pub fn brightness(&self) -> Option<Brightness>
[src]
Controls the device's brightness.
pub fn game_mode(&self) -> Option<GameMode>
[src]
Controls the device's Game Mode.
pub fn keyboard_layout(&self) -> Option<KeyboardLayout>
[src]
Gets the device's keyboard layout.
pub fn macro_effect(&self) -> Option<MacroEffect>
[src]
Controls the device's macro effect.
pub fn macro_mode(&self) -> Option<MacroMode>
[src]
Controls the device's Macro Mode.
pub fn matrix_dimensions(&self) -> Option<MatrixDimensions>
[src]
Gets the device's matrix dimensions.
pub fn no_effect(&self) -> Option<NoEffect>
[src]
Disables any lighting effect.
pub fn reactive_effect(&self) -> Option<ReactiveEffect>
[src]
Controls the reactive effect.
pub fn ripple_effect(&self) -> Option<RippleEffect>
[src]
Controls the ripple effect.
pub fn spectrum_effect(&self) -> Option<SpectrumEffect>
[src]
Sets the spectrum effect.
pub fn starlight_effect(&self) -> Option<StarlightEffect>
[src]
Sets the starlight effect.
pub fn static_effect(&self) -> Option<StaticEffect>
[src]
Controls the static effect.
pub fn wave_effect(&self) -> Option<WaveEffect>
[src]
Controls the wave effect.
Trait Implementations
impl Clone for Device
[src]
impl Debug for Device
[src]
impl GenericMethods for Device
[src]
fn get_generic_device(&self) -> &GenericDevice
[src]
fn serial(&self) -> &str
[src]
fn capabilities(&self) -> AvailableCapabilities
[src]
fn name(&self) -> BoxFuture<'_, Result<String, Error>>
[src]
fn firmware_version(&self) -> BoxFuture<'_, Result<String, Error>>
[src]
fn driver_version(&self) -> BoxFuture<'_, Result<String, Error>>
[src]
fn has_dedicated_macro_keys(&self) -> BoxFuture<'_, Result<bool, Error>>
[src]
fn razer_urls(&self) -> BoxFuture<'_, Result<HashMap<String, String>, Error>>
[src]
Auto Trait Implementations
impl !RefUnwindSafe for Device
impl Send for Device
impl Sync for Device
impl Unpin for Device
impl !UnwindSafe for Device
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,