pub struct LocoAddress(/* private fields */);Implementations§
Source§impl LocoAddress
impl LocoAddress
Sourcepub fn is_long(&self) -> bool
pub fn is_long(&self) -> bool
Get the address type
Returns true when the address is 14 bits long
Sourcepub fn as_bytes_sanitized(&self) -> [u8; 2]
pub fn as_bytes_sanitized(&self) -> [u8; 2]
Returns the address data as two octets in big endian with sanitization that is useful for constructing CBUS packets
7 bit addresses have most significant octet set to 0. 14 bit addresses have bits 6,7 of most significant octet set to 1.
Auto Trait Implementations§
impl Freeze for LocoAddress
impl RefUnwindSafe for LocoAddress
impl Send for LocoAddress
impl Sync for LocoAddress
impl Unpin for LocoAddress
impl UnsafeUnpin for LocoAddress
impl UnwindSafe for LocoAddress
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