pub struct DevAddr(pub [u8; 4]);Expand description
Device address (4 bytes, big-endian display order).
Assigned by the network during join, then carried in every Data frame.
Wire bytes are little-endian; the struct keeps display order so
DevAddr([0x49, 0xBE, 0x7D, 0xF1]) prints as 49be7df1.
Tuple Fields§
§0: [u8; 4]Implementations§
Source§impl DevAddr
impl DevAddr
Sourcepub const fn from_slice(s: &[u8]) -> Result<Self>
pub const fn from_slice(s: &[u8]) -> Result<Self>
Construct from a slice, validating the length.
§Errors
Returns Error::InvalidIdentifierLength when the slice length
does not match the expected size.
Source§impl DevAddr
impl DevAddr
Sourcepub fn from_hex(s: &str) -> Result<Self>
pub fn from_hex(s: &str) -> Result<Self>
Construct from a hex string.
§Errors
Error::Hex if the input is not valid hex.
Error::InvalidIdentifierLength if the decoded byte length is wrong.
Sourcepub fn from_base64(s: &str) -> Result<Self>
pub fn from_base64(s: &str) -> Result<Self>
Construct from a standard base64 string.
§Errors
Error::Base64 if the input is not valid base64.
Error::InvalidIdentifierLength if the decoded byte length is wrong.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for DevAddr
impl<'de> Deserialize<'de> for DevAddr
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Copy for DevAddr
impl Eq for DevAddr
impl StructuralPartialEq for DevAddr
Auto Trait Implementations§
impl Freeze for DevAddr
impl RefUnwindSafe for DevAddr
impl Send for DevAddr
impl Sync for DevAddr
impl Unpin for DevAddr
impl UnsafeUnpin for DevAddr
impl UnwindSafe for DevAddr
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