Skip to main content

FrameDevice

Trait FrameDevice 

Source
pub trait FrameDevice<F> {
    // Required methods
    fn to_dsu_frame(&self, frame: &F, gyro_disabled: bool) -> DSUFrame;
    fn is_device_button_pressed(&self, button: &DeviceButton, frame: &F) -> bool;
}
Expand description

A trait defining shared behavior dependant on the frame type F between compatible devices.

Required Methods§

Source

fn to_dsu_frame(&self, frame: &F, gyro_disabled: bool) -> DSUFrame

Source

fn is_device_button_pressed(&self, button: &DeviceButton, frame: &F) -> bool

Test if a DeviceButton is pressed.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§