pub enum StateChangeType {
DigitalInput {
pin: u32,
value: bool,
},
DigitalOutput {
pin: u32,
value: bool,
},
AnalogInput {
pin: u32,
value: u32,
},
AnalogOutput {
pin: u32,
value: u32,
},
EncoderValue {
index: u32,
value: i32,
},
PwmDutyCycle {
channel: usize,
duty: u32,
},
ThreadStatus {
status: ThreadStatus,
},
Error {
message: Option<String>,
},
CustomValue {
key: String,
value: String,
},
FullUpdate,
}Expand description
State change notification type.
Represents the type of state change that occurred.
Variants§
DigitalInput
Digital input changed
DigitalOutput
Digital output changed
AnalogInput
Analog input changed
AnalogOutput
Analog output changed
EncoderValue
Encoder value changed
PwmDutyCycle
PWM duty cycle changed
ThreadStatus
Thread status changed
Fields
§
status: ThreadStatusError
Error occurred
CustomValue
Custom value changed
FullUpdate
Full state update
Trait Implementations§
Source§impl Clone for StateChangeType
impl Clone for StateChangeType
Source§fn clone(&self) -> StateChangeType
fn clone(&self) -> StateChangeType
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for StateChangeType
impl Debug for StateChangeType
Source§impl PartialEq for StateChangeType
impl PartialEq for StateChangeType
impl Eq for StateChangeType
impl StructuralPartialEq for StateChangeType
Auto Trait Implementations§
impl Freeze for StateChangeType
impl RefUnwindSafe for StateChangeType
impl Send for StateChangeType
impl Sync for StateChangeType
impl Unpin for StateChangeType
impl UnwindSafe for StateChangeType
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.