[][src]Enum toio::Event

pub enum Event {
    Battery(usize),
    Collision(bool),
    Slope(bool),
    Button(bool),
    Posture(Posture),
    Position(Option<Position>),
    StdId(Option<StdId>),
    Version(String),
}

The event sent when the status is updated.

Variants

Battery(usize)

Battery is updated.

Collision(bool)

Set if the cube collides with an object.

Slope(bool)

Set if the cube is on a slope.

Button(bool)

Set if the button is pressed.

Posture(Posture)

Posture of the cube.

Position(Option<Position>)

Position information.

StdId(Option<StdId>)

Standard id information.

Version(String)

The protocol version.

Implementations

impl Event[src]

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

Constructs a new Event::Battery.

impl Event[src]

pub fn new_collision(f0: bool) -> Self[src]

Constructs a new Event::Collision.

impl Event[src]

pub fn new_slope(f0: bool) -> Self[src]

Constructs a new Event::Slope.

impl Event[src]

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

Constructs a new Event::Button.

impl Event[src]

pub fn new_posture(f0: Posture) -> Self[src]

Constructs a new Event::Posture.

impl Event[src]

pub fn new_position(f0: Option<Position>) -> Self[src]

Constructs a new Event::Position.

impl Event[src]

pub fn new_std_id(f0: Option<StdId>) -> Self[src]

Constructs a new Event::StdId.

impl Event[src]

pub fn new_version(f0: String) -> Self[src]

Constructs a new Event::Version.

Trait Implementations

impl Clone for Event[src]

impl Debug for Event[src]

impl<'de> Deserialize<'de> for Event[src]

impl Serialize for Event[src]

Auto Trait Implementations

impl RefUnwindSafe for Event

impl Send for Event

impl Sync for Event

impl Unpin for Event

impl UnwindSafe for Event

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> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[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.