pub enum CommandBehavior {
Command,
Inquiry(InquiryResponseSpec),
}Expand description
Complete command behavior metadata used by the runtime.
This is the single source of truth for whether a VISCA request is an action command or an inquiry, and for how inquiry data replies should be routed.
Variants§
Command
A command that performs an action and returns ACK/Completion.
Inquiry(InquiryResponseSpec)
An inquiry that returns a data reply routed by the included response spec.
Implementations§
Source§impl CommandBehavior
impl CommandBehavior
Sourcepub const fn command_kind(self) -> CommandKind
pub const fn command_kind(self) -> CommandKind
Return the VISCA transport command kind derived from this behavior.
Sourcepub const fn inquiry_response_spec(self) -> Option<InquiryResponseSpec>
pub const fn inquiry_response_spec(self) -> Option<InquiryResponseSpec>
Return the inquiry response spec when this behavior is an inquiry.
Trait Implementations§
Source§impl Clone for CommandBehavior
impl Clone for CommandBehavior
Source§fn clone(&self) -> CommandBehavior
fn clone(&self) -> CommandBehavior
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for CommandBehavior
Source§impl Debug for CommandBehavior
impl Debug for CommandBehavior
impl Eq for CommandBehavior
Source§impl PartialEq for CommandBehavior
impl PartialEq for CommandBehavior
Source§fn eq(&self, other: &CommandBehavior) -> bool
fn eq(&self, other: &CommandBehavior) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for CommandBehavior
Auto Trait Implementations§
impl Freeze for CommandBehavior
impl RefUnwindSafe for CommandBehavior
impl Send for CommandBehavior
impl Sync for CommandBehavior
impl Unpin for CommandBehavior
impl UnsafeUnpin for CommandBehavior
impl UnwindSafe for CommandBehavior
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