pub struct StartLevelChange {
pub direction: u8,
pub ignore_start_level: bool,
pub start_level: u8,
pub duration: Option<u8>,
}Expand description
Multilevel Switch Start Level Change (0x26 0x04).
Fields§
§direction: u8The direction field (bits 6..8).
ignore_start_level: boolThe ignore_start_level field (bits 5..6).
start_level: u8The start_level field.
duration: Option<u8>The duration field.
Implementations§
Source§impl StartLevelChange
impl StartLevelChange
Sourcepub fn parse(p: &[u8]) -> Result<Self, ParseError>
pub fn parse(p: &[u8]) -> Result<Self, ParseError>
Parses the payload after the command id. Extra trailing bytes (newer versions) are ignored.
Sourcepub fn encode_payload(&self, w: &mut Vec<u8>)
pub fn encode_payload(&self, w: &mut Vec<u8>)
Appends the payload after the command id.
Trait Implementations§
Source§impl Clone for StartLevelChange
impl Clone for StartLevelChange
Source§impl Debug for StartLevelChange
impl Debug for StartLevelChange
Source§impl Default for StartLevelChange
impl Default for StartLevelChange
impl Eq for StartLevelChange
Source§impl From<StartLevelChange> for Command
impl From<StartLevelChange> for Command
Source§fn from(c: StartLevelChange) -> Self
fn from(c: StartLevelChange) -> Self
Converts to this type from the input type.
Source§impl PartialEq for StartLevelChange
impl PartialEq for StartLevelChange
impl StructuralPartialEq for StartLevelChange
Auto Trait Implementations§
impl Freeze for StartLevelChange
impl RefUnwindSafe for StartLevelChange
impl Send for StartLevelChange
impl Sync for StartLevelChange
impl Unpin for StartLevelChange
impl UnsafeUnpin for StartLevelChange
impl UnwindSafe for StartLevelChange
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