[][src]Enum buttplug::client::device::LinearCommand

pub enum LinearCommand {
    Linear(u32f64),
    LinearVec(Vec<(u32, f64)>),
    LinearMap(HashMap<u32, (u32, f64)>),
}

Convenience enum for forming LinearCmd commands.

Allows users to easily specify position/durations across different rotation features in a device. Units are in absolute position (0.0-1.0) and millliseconds of movement duration.

Variants

Linear(u32f64)

Sets all linear features of a device to the same position/duration.

LinearVec(Vec<(u32, f64)>)

Sets linear features to position/duration based on the index of the position/duration pair in the vec (i.e. motor 0 position/duration is set to LinearVec[0], motor 1 is set to LinearVec[1], etc...)

LinearMap(HashMap<u32, (u32, f64)>)

Sets linear features indicated by index to requested position/duration. For instance, if the map has an entry of (1, (0.5, 500)), it will set motor 1 to move to position 0.5 over the course of 500ms.

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> From<T> for T[src]

impl<T> GetTypeId for T where
    T: Any
[src]

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

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

impl<T> Same<T> for T

type Output = T

Should always be Self

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.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

impl<T> WithSubscriber for T[src]