Enum lss_driver::CommandModifier
source · [−]pub enum CommandModifier {
Speed(u32),
SpeedDegrees(u32),
Timed(u32),
TimedDuration(Duration),
CurrentHold(u32),
CurrentLimp(u32),
None,
Custom(&'static str, i32),
}
Expand description
Modifiers used for some commands
Variants
Speed(u32)
only for P commands microseconds per second wiki
SpeedDegrees(u32)
Only for D or MD commands degrees per second wiki
Timed(u32)
Useful for (P, D, MD) actions in milliseconds wiki
TimedDuration(Duration)
Useful for (P, D, MD) actions wiki
CurrentHold(u32)
Useful with (D; MD; WD; WR) in mA wiki
CurrentLimp(u32)
Useful with (D; MD; WD; WR.) in mA wiki
None
Special modifier that allows you to use modifiable commands with no modifiers
Custom(&'static str, i32)
Useful in case there is a new modifier that is not supported by this library
Implementations
sourceimpl CommandModifier
impl CommandModifier
pub fn to_msg(&self) -> String
pub fn vec_to_msg(modifiers: &[CommandModifier]) -> String
Trait Implementations
sourceimpl Clone for CommandModifier
impl Clone for CommandModifier
sourcefn clone(&self) -> CommandModifier
fn clone(&self) -> CommandModifier
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for CommandModifier
impl Debug for CommandModifier
sourceimpl PartialEq<CommandModifier> for CommandModifier
impl PartialEq<CommandModifier> for CommandModifier
sourcefn eq(&self, other: &CommandModifier) -> bool
fn eq(&self, other: &CommandModifier) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &CommandModifier) -> bool
fn ne(&self, other: &CommandModifier) -> bool
This method tests for !=
.
impl Copy for CommandModifier
impl Eq for CommandModifier
impl StructuralEq for CommandModifier
impl StructuralPartialEq for CommandModifier
Auto Trait Implementations
impl RefUnwindSafe for CommandModifier
impl Send for CommandModifier
impl Sync for CommandModifier
impl Unpin for CommandModifier
impl UnwindSafe for CommandModifier
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more