Struct CommandOperation

Source
pub struct CommandOperation<'i, Interface, AddressType: Copy, InFieldSet, OutFieldSet> { /* private fields */ }
Expand description

Intermediate type for doing command operations

Implementations§

Source§

impl<Interface, AddressType: Copy> CommandOperation<'_, Interface, AddressType, (), ()>
where Interface: CommandInterface<AddressType = AddressType>,

Simple command

Source

pub fn dispatch(self) -> Result<(), Interface::Error>

Dispatch the command to the device

Source§

impl<Interface, AddressType: Copy, InFieldSet: FieldSet> CommandOperation<'_, Interface, AddressType, InFieldSet, ()>
where Interface: CommandInterface<AddressType = AddressType>,

Only input

Source

pub fn dispatch( self, f: impl FnOnce(&mut InFieldSet), ) -> Result<(), Interface::Error>

Dispatch the command to the device

Source§

impl<Interface, AddressType: Copy, OutFieldSet: FieldSet> CommandOperation<'_, Interface, AddressType, (), OutFieldSet>
where Interface: CommandInterface<AddressType = AddressType>,

Only output

Source

pub fn dispatch(self) -> Result<OutFieldSet, Interface::Error>

Dispatch the command to the device

Source§

impl<Interface, AddressType: Copy, InFieldSet: FieldSet, OutFieldSet: FieldSet> CommandOperation<'_, Interface, AddressType, InFieldSet, OutFieldSet>
where Interface: CommandInterface<AddressType = AddressType>,

Input and output

Source

pub fn dispatch( self, f: impl FnOnce(&mut InFieldSet), ) -> Result<OutFieldSet, Interface::Error>

Dispatch the command to the device

Source§

impl<Interface, AddressType: Copy> CommandOperation<'_, Interface, AddressType, (), ()>
where Interface: AsyncCommandInterface<AddressType = AddressType>,

Simple command async

Source

pub async fn dispatch_async(self) -> Result<(), Interface::Error>

Dispatch the command to the device

Source§

impl<Interface, AddressType: Copy, InFieldSet: FieldSet> CommandOperation<'_, Interface, AddressType, InFieldSet, ()>
where Interface: AsyncCommandInterface<AddressType = AddressType>,

Only input async

Source

pub async fn dispatch_async( self, f: impl FnOnce(&mut InFieldSet), ) -> Result<(), Interface::Error>

Dispatch the command to the device

Source§

impl<Interface, AddressType: Copy, OutFieldSet: FieldSet> CommandOperation<'_, Interface, AddressType, (), OutFieldSet>
where Interface: AsyncCommandInterface<AddressType = AddressType>,

Only output async

Source

pub async fn dispatch_async(self) -> Result<OutFieldSet, Interface::Error>

Dispatch the command to the device

Source§

impl<Interface, AddressType: Copy, InFieldSet: FieldSet, OutFieldSet: FieldSet> CommandOperation<'_, Interface, AddressType, InFieldSet, OutFieldSet>
where Interface: AsyncCommandInterface<AddressType = AddressType>,

Input and output async

Source

pub async fn dispatch_async( self, f: impl FnOnce(&mut InFieldSet), ) -> Result<OutFieldSet, Interface::Error>

Dispatch the command to the device

Auto Trait Implementations§

§

impl<'i, Interface, AddressType, InFieldSet, OutFieldSet> Freeze for CommandOperation<'i, Interface, AddressType, InFieldSet, OutFieldSet>
where AddressType: Freeze,

§

impl<'i, Interface, AddressType, InFieldSet, OutFieldSet> RefUnwindSafe for CommandOperation<'i, Interface, AddressType, InFieldSet, OutFieldSet>
where AddressType: RefUnwindSafe, Interface: RefUnwindSafe, InFieldSet: RefUnwindSafe, OutFieldSet: RefUnwindSafe,

§

impl<'i, Interface, AddressType, InFieldSet, OutFieldSet> Send for CommandOperation<'i, Interface, AddressType, InFieldSet, OutFieldSet>
where AddressType: Send, Interface: Send, InFieldSet: Send, OutFieldSet: Send,

§

impl<'i, Interface, AddressType, InFieldSet, OutFieldSet> Sync for CommandOperation<'i, Interface, AddressType, InFieldSet, OutFieldSet>
where AddressType: Sync, Interface: Sync, InFieldSet: Sync, OutFieldSet: Sync,

§

impl<'i, Interface, AddressType, InFieldSet, OutFieldSet> Unpin for CommandOperation<'i, Interface, AddressType, InFieldSet, OutFieldSet>
where AddressType: Unpin, InFieldSet: Unpin, OutFieldSet: Unpin,

§

impl<'i, Interface, AddressType, InFieldSet, OutFieldSet> !UnwindSafe for CommandOperation<'i, Interface, AddressType, InFieldSet, OutFieldSet>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.