pub struct ShiftDirection(/* private fields */);Expand description
Repeater shift direction, stored as a raw firmware value.
Maps to the shift field (4-bit, low nibble of byte 0x08) in the FO
and ME commands. Known values: 0 = Simplex, 1 = Up, 2 = Down,
3 = Split. Values 4-15 are used by VFO mode for extended shift
configurations whose meaning is not yet fully documented.
Accepts any value in the 4-bit range 0-15 to avoid parse failures when reading VFO state from the radio.
Implementations§
Source§impl ShiftDirection
impl ShiftDirection
Sourcepub const fn new(value: u8) -> Result<Self, ValidationError>
pub const fn new(value: u8) -> Result<Self, ValidationError>
Creates a new ShiftDirection from a raw 4-bit value.
§Errors
Returns ValidationError::ShiftOutOfRange if value > 15.
Trait Implementations§
Source§impl Clone for ShiftDirection
impl Clone for ShiftDirection
Source§fn clone(&self) -> ShiftDirection
fn clone(&self) -> ShiftDirection
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 ShiftDirection
impl Debug for ShiftDirection
Source§impl From<ShiftDirection> for u8
impl From<ShiftDirection> for u8
Source§fn from(dir: ShiftDirection) -> Self
fn from(dir: ShiftDirection) -> Self
Converts to this type from the input type.
Source§impl Hash for ShiftDirection
impl Hash for ShiftDirection
Source§impl PartialEq for ShiftDirection
impl PartialEq for ShiftDirection
Source§impl TryFrom<u8> for ShiftDirection
impl TryFrom<u8> for ShiftDirection
impl Copy for ShiftDirection
impl Eq for ShiftDirection
impl StructuralPartialEq for ShiftDirection
Auto Trait Implementations§
impl Freeze for ShiftDirection
impl RefUnwindSafe for ShiftDirection
impl Send for ShiftDirection
impl Sync for ShiftDirection
impl Unpin for ShiftDirection
impl UnwindSafe for ShiftDirection
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