Trait NecCommandVariant

Source
pub trait NecCommandVariant: Sized {
    const PULSE_DISTANCE: &'static NecPulseLen;

    // Required methods
    fn validate(bits: u32) -> bool;
    fn unpack(bits: u32, repeat: bool) -> Option<Self>;
    fn pack(&self) -> u32;
}
Expand description

Nec Command Variant

Required Associated Constants§

Required Methods§

Source

fn validate(bits: u32) -> bool

Validate the bits as a Command of this type

Source

fn unpack(bits: u32, repeat: bool) -> Option<Self>

Unpack the bits into Command

Source

fn pack(&self) -> u32

Pack command into a u32

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.

Implementors§

Source§

impl NecCommandVariant for AppleNecCommand

Source§

const PULSE_DISTANCE: &'static NecPulseLen = NEC_STANDARD_TIMING

Source§

impl NecCommandVariant for Nec16Command

Source§

const PULSE_DISTANCE: &'static NecPulseLen = NEC_STANDARD_TIMING

Source§

impl NecCommandVariant for NecCommand

Source§

const PULSE_DISTANCE: &'static NecPulseLen = NEC_STANDARD_TIMING

Source§

impl NecCommandVariant for NecDebugCmd

Source§

const PULSE_DISTANCE: &'static NecPulseLen = NEC_STANDARD_TIMING

Source§

impl NecCommandVariant for SamsungNecCommand

Source§

const PULSE_DISTANCE: &'static NecPulseLen = NEC_SAMSUNG_TIMING