[][src]Trait galaxy_buds_live_rs::message::bud_property::BudProperty

pub trait BudProperty {
    type Item;
    fn decode(val: u8) -> Self::Item;
fn encode(&self) -> u8; fn side_val(val: u8, side: Side) -> u8 { ... }
fn value(val: u8, side: Side) -> Self::Item { ... } }

A property value of a single earbud

Associated Types

type Item

Loading content...

Required methods

fn decode(val: u8) -> Self::Item

Decode the value. Returns a property variant

fn encode(&self) -> u8

Needs to be implemented to send a property variant inside a msg payload

Loading content...

Provided methods

fn side_val(val: u8, side: Side) -> u8

Get the corresponding value of a byte based on the side of the earbud (left/right)

fn value(val: u8, side: Side) -> Self::Item

Get the property item decoded based on the side and msg byte

Loading content...

Implementors

impl BudProperty for EqualizerType[src]

impl BudProperty for Placement[src]

Placement comes inside some payloads so define the decode() here

type Item = Placement

impl BudProperty for TouchpadOption[src]

Loading content...