Skip to main content

RGBLedMatrixOptions

Struct RGBLedMatrixOptions 

Source
#[repr(C)]
pub struct RGBLedMatrixOptions {
Show 19 fields pub hardware_mapping: *const c_char, pub rows: c_int, pub cols: c_int, pub chain_length: c_int, pub parallel: c_int, pub pwm_bits: c_int, pub pwm_lsb_nanoseconds: c_int, pub pwm_dither_bits: c_int, pub brightness: c_int, pub scan_mode: c_int, pub row_address_type: c_int, pub multiplexing: c_int, pub led_rgb_sequence: *const c_char, pub pixel_mapper_config: *const c_char, pub panel_type: *const c_char, pub disable_hardware_pulsing: c_char, pub show_refresh_rate: c_char, pub inverse_colors: c_char, pub limit_refresh_rate_hz: c_int,
}
Expand description

Parameters to create a new matrix.

To get the defaults, non-set values have to be initialized to zero, so you should zero out this struct before setting anything.

Fields§

§hardware_mapping: *const c_char§rows: c_int§cols: c_int§chain_length: c_int§parallel: c_int§pwm_bits: c_int§pwm_lsb_nanoseconds: c_int§pwm_dither_bits: c_int§brightness: c_int§scan_mode: c_int§row_address_type: c_int§multiplexing: c_int§led_rgb_sequence: *const c_char§pixel_mapper_config: *const c_char§panel_type: *const c_char§disable_hardware_pulsing: c_char

The following are boolean flags, all off by default

§show_refresh_rate: c_char§inverse_colors: c_char§limit_refresh_rate_hz: c_int

Implementations§

Source§

impl RGBLedMatrixOptions

Source

pub fn new() -> Self

Source

pub fn hardware_mapping(self, mapping: &str) -> Self

Source

pub fn rows(self, rows: u16) -> Self

Source

pub fn cols(self, cols: u16) -> Self

Source

pub fn chain_length(self, length: u16) -> Self

Source

pub fn parallel(self, parallel: u16) -> Self

Source

pub fn pwm_bits(self, bits: u16) -> Self

Source

pub fn pwm_lsb_nanoseconds(self, ns: u16) -> Self

Source

pub fn pwm_dither_bits(self, bits: u16) -> Self

Source

pub fn brightness(self, brightness: u16) -> Self

Source

pub fn scan_mode(self, mode: u16) -> Self

Source

pub fn row_address_type(self, address_type: u16) -> Self

Source

pub fn multiplexing(self, multiplexing: u16) -> Self

Source

pub fn disable_hardware_pulsing(self, disable: bool) -> Self

Source

pub fn show_refresh_rate(self, show: bool) -> Self

Source

pub fn inverse_colors(self, inverse: bool) -> Self

Source

pub fn led_rgb_sequence(self, sequence: &str) -> Self

Source

pub fn pixel_mapper_config(self, config: &str) -> Self

Source

pub fn panel_type(self, panel_type: &str) -> Self

Source

pub fn limit_refresh_rate_hz(self, hz: u32) -> Self

Source

pub fn build(self) -> Box<RGBLedMatrix>

Source

pub fn build_with_rt_options( self, rt_options: RGBLedRuntimeOptions, ) -> Box<RGBLedMatrix>

Trait Implementations§

Source§

impl Clone for RGBLedMatrixOptions

Source§

fn clone(&self) -> RGBLedMatrixOptions

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for RGBLedMatrixOptions

Source§

impl Debug for RGBLedMatrixOptions

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for RGBLedMatrixOptions

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.