[][src]Struct toio::proto::MotorAcc

pub struct MotorAcc {
    pub id: u8,
    pub speed: u8,
    pub acc: u8,
    pub rotate_speed: u16,
    pub rotate_dir: MotorCubeDir,
    pub trans_dir: MotorCubeDir,
    pub prio: MotorPriority,
    pub duration: u8,
}

The request to move the cube with acceleration.

Fields

id: u8

The request id to find the corresponding response to this request.

speed: u8

The speed of the cube.

acc: u8

The acceleration of the cube.

rotate_speed: u16

The rotation speed of the cube.

rotate_dir: MotorCubeDir

The rotation direction of the cube.

trans_dir: MotorCubeDir

The translation direction of the cube.

prio: MotorPriority

The priority of translation/rotation speed.

duration: u8

The duration to keep moving the cube in seconds.

Implementations

impl MotorAcc[src]

pub fn new(
    id: u8,
    speed: u8,
    acc: u8,
    rotate_speed: u16,
    rotate_dir: MotorCubeDir,
    trans_dir: MotorCubeDir,
    prio: MotorPriority,
    duration: u8
) -> Self
[src]

Constructs a new MotorAcc.

Trait Implementations

impl Clone for MotorAcc[src]

impl Debug for MotorAcc[src]

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

impl Eq for MotorAcc[src]

impl PartialEq<MotorAcc> for MotorAcc[src]

impl Serialize for MotorAcc[src]

impl StructuralEq for MotorAcc[src]

impl StructuralPartialEq for MotorAcc[src]

Auto Trait Implementations

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.