pub struct AppEui(/* private fields */);
Expand description
You can construct AppEui from a hex-encoded MSB string or bytes in LSB format.
Typically, a LNS will provide a hex-encoded MSB string such as: 00:11:22:33:44:55:66:77
.
To create from a string:
use lorawan::keys::AppEui;
use core::str::FromStr;
let app_eui = AppEui::from_str("0011223344556677").unwrap();
To create from a byte array, you should enter the bytes in LSB format:
use lorawan::keys::AppEui;
let app_eui = AppEui::from([0x77, 0x66, 0x55, 0x44, 0x33, 0x22, 0x11, 0x00]);
Trait Implementations§
Source§impl<'de> Deserialize<'de> for AppEui
impl<'de> Deserialize<'de> for AppEui
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<AppEui, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<AppEui, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for AppEui
impl Serialize for AppEui
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl Copy for AppEui
impl Eq for AppEui
impl StructuralPartialEq for AppEui
Auto Trait Implementations§
impl Freeze for AppEui
impl RefUnwindSafe for AppEui
impl Send for AppEui
impl Sync for AppEui
impl Unpin for AppEui
impl UnwindSafe for AppEui
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<T> ToHex for T
impl<T> ToHex for T
Source§fn encode_hex<U>(&self) -> Uwhere
U: FromIterator<char>,
fn encode_hex<U>(&self) -> Uwhere
U: FromIterator<char>,
Encode the hex strict representing
self
into the result. Lower case
letters are used (e.g. f9b4ca
)Source§fn encode_hex_upper<U>(&self) -> Uwhere
U: FromIterator<char>,
fn encode_hex_upper<U>(&self) -> Uwhere
U: FromIterator<char>,
Encode the hex strict representing
self
into the result. Upper case
letters are used (e.g. F9B4CA
)