[][src]Struct dynamixel2::instructions::SyncRead

pub struct SyncRead<'a> {
    pub motor_ids: &'a [u8],
    pub address: u16,
    // some fields omitted
}

Perform a sync read, reading the data into a supplied buffer.

Fields

motor_ids: &'a [u8]

The motors to read from.

address: u16

The address to read from.

Implementations

impl<'a> SyncRead<'a>[src]

pub fn new(motor_ids: &'a [u8], address: u16, buffer: &'a mut [u8]) -> Self[src]

Create a new SyncRead instruction to read data from a list motors.

To read 12 bytes from 3 motors, you must supply a buffer of 36 bytes.

Panic

Panics if the buffer size is not a multiple of the number of motors.

pub fn buffer(&self) -> &[u8][src]

Get a non-mutable reference to the read buffer.

pub fn buffer_mut(&mut self) -> &mut [u8][src]

Get a mutable reference to the read buffer.

pub fn length(&self) -> usize[src]

The number of bytes to read from each motor.

Trait Implementations

impl<'a> Debug for SyncRead<'a>[src]

impl<'_> Instruction for SyncRead<'_>[src]

type Response = u8

The response type.

Auto Trait Implementations

impl<'a> RefUnwindSafe for SyncRead<'a>

impl<'a> Send for SyncRead<'a>

impl<'a> Sync for SyncRead<'a>

impl<'a> Unpin for SyncRead<'a>

impl<'a> !UnwindSafe for SyncRead<'a>

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, 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.