[][src]Enum toio::proto::Message

pub enum Message {
    Id(Id),
    Motion(Motion),
    Button(Button),
    Battery(u8),
    Motor(Motor),
    Light(Light),
    Sound(Sound),
    Config(Config),
}

Message read/written from/to characteristics.

Variants

Id(Id)

Message for id reader.

Motion(Motion)

Message for motion sensor.

Button(Button)

Message for button.

Battery(u8)

Message for battery.

Motor(Motor)

Message for motor.

Light(Light)

Message for light.

Sound(Sound)

Message for sound device.

Config(Config)

Message for configuration.

Implementations

impl Message[src]

pub fn new_id(f0: Id) -> Self[src]

Constructs a new Message::Id.

impl Message[src]

pub fn new_motion(f0: Motion) -> Self[src]

Constructs a new Message::Motion.

impl Message[src]

pub fn new_button(f0: Button) -> Self[src]

Constructs a new Message::Button.

impl Message[src]

pub fn new_battery(f0: u8) -> Self[src]

Constructs a new Message::Battery.

impl Message[src]

pub fn new_motor(f0: Motor) -> Self[src]

Constructs a new Message::Motor.

impl Message[src]

pub fn new_light(f0: Light) -> Self[src]

Constructs a new Message::Light.

impl Message[src]

pub fn new_sound(f0: Sound) -> Self[src]

Constructs a new Message::Sound.

impl Message[src]

pub fn new_config(f0: Config) -> Self[src]

Constructs a new Message::Config.

Trait Implementations

impl Clone for Message[src]

impl Debug for Message[src]

impl Eq for Message[src]

impl PartialEq<Message> for Message[src]

impl StructuralEq for Message[src]

impl StructuralPartialEq for Message[src]

impl<'_> TryFrom<(Uuid, &'_ [u8])> for Message[src]

type Error = Error

The type returned in the event of a conversion error.

impl TryFrom<(Uuid, Vec<u8>)> for Message[src]

type Error = Error

The type returned in the event of a conversion error.

impl TryFrom<Message> for (Uuid, Vec<u8>)[src]

type Error = Error

The type returned in the event of a conversion error.

Auto Trait Implementations

impl RefUnwindSafe for Message

impl Send for Message

impl Sync for Message

impl Unpin for Message

impl UnwindSafe for Message

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.