[−][src]Struct lorawan::parser::JoinRequestPayload
JoinAcceptPayload represents a JoinRequest.
It can be built either directly through the new or using the parse function.
Implementations
impl<T: AsRef<[u8]>, F: CryptoFactory> JoinRequestPayload<T, F>
[src]
pub fn new_with_factory<'a>(data: T, factory: F) -> Result<Self, &'a str>
[src]
Creates a new JoinRequestPayload if the provided data is acceptable.
Argument
- data - the bytes for the payload.
Examples
let data = vec![0x00, 0x04, 0x03, 0x02, 0x01, 0x04, 0x03, 0x02, 0x01, 0x05, 0x04, 0x03, 0x02, 0x05, 0x04, 0x03, 0x02, 0x2d, 0x10, 0x6a, 0x99, 0x0e, 0x12]; let phy = lorawan::parser::JoinRequestPayload::new_with_factory(data, lorawan::default_crypto::DefaultFactory);
pub fn app_eui(&self) -> EUI64<&[u8]>
[src]
Gives the APP EUI of the JoinRequest.
pub fn dev_eui(&self) -> EUI64<&[u8]>
[src]
Gives the DEV EUI of the JoinRequest.
pub fn dev_nonce(&self) -> DevNonce<&[u8]>
[src]
Gives the DEV Nonce of the JoinRequest.
pub fn validate_mic(&self, key: &AES128) -> bool
[src]
Verifies that the JoinRequest has correct MIC.
impl<T: AsRef<[u8]>> JoinRequestPayload<T, DefaultFactory>
[src]
pub fn new<'a>(data: T) -> Result<Self, &'a str>
[src]
Creates a new JoinRequestPayload if the provided data is acceptable.
Argument
- data - the bytes for the payload.
Examples
let data = vec![0x00, 0x04, 0x03, 0x02, 0x01, 0x04, 0x03, 0x02, 0x01, 0x05, 0x04, 0x03, 0x02, 0x05, 0x04, 0x03, 0x02, 0x2d, 0x10, 0x6a, 0x99, 0x0e, 0x12]; let phy = lorawan::parser::JoinRequestPayload::new(data);
Trait Implementations
impl<T: AsRef<[u8]>, F> AsPhyPayloadBytes for JoinRequestPayload<T, F>
[src]
impl<T: Debug, F: Debug> Debug for JoinRequestPayload<T, F>
[src]
impl<T: PartialEq, F: PartialEq> PartialEq<JoinRequestPayload<T, F>> for JoinRequestPayload<T, F>
[src]
pub fn eq(&self, other: &JoinRequestPayload<T, F>) -> bool
[src]
pub fn ne(&self, other: &JoinRequestPayload<T, F>) -> bool
[src]
impl<T, F> StructuralPartialEq for JoinRequestPayload<T, F>
[src]
Auto Trait Implementations
impl<T, F> RefUnwindSafe for JoinRequestPayload<T, F> where
F: RefUnwindSafe,
T: RefUnwindSafe,
[src]
F: RefUnwindSafe,
T: RefUnwindSafe,
impl<T, F> Send for JoinRequestPayload<T, F> where
F: Send,
T: Send,
[src]
F: Send,
T: Send,
impl<T, F> Sync for JoinRequestPayload<T, F> where
F: Sync,
T: Sync,
[src]
F: Sync,
T: Sync,
impl<T, F> Unpin for JoinRequestPayload<T, F> where
F: Unpin,
T: Unpin,
[src]
F: Unpin,
T: Unpin,
impl<T, F> UnwindSafe for JoinRequestPayload<T, F> where
F: UnwindSafe,
T: UnwindSafe,
[src]
F: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> MHDRAble for T where
T: AsPhyPayloadBytes,
[src]
T: AsPhyPayloadBytes,
impl<T> MICAble for T where
T: AsPhyPayloadBytes,
[src]
T: AsPhyPayloadBytes,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,