pub enum Event {
Battery(usize),
Collision(bool),
Slope(bool),
Button(bool),
Posture(Posture),
Position(Option<Position>),
StdId(Option<StdId>),
Version(String),
}Expand description
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§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Event
impl<'de> Deserialize<'de> for Event
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Event
impl RefUnwindSafe for Event
impl Send for Event
impl Sync for Event
impl Unpin for Event
impl UnwindSafe for Event
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more