pub enum Wor {
JoinRequest {
uplink: Carrier,
},
Uplink(SealedWor),
}Expand description
A wake-on-radio frame, as a relay reads it.
Variants§
JoinRequest
Ahead of a join request. Nothing protects it, since the device has no session yet.
Uplink(SealedWor)
Ahead of a Class A uplink, sealed with the device’s WorKeys.
Implementations§
Source§impl Wor
impl Wor
Sourcepub fn parse(bytes: &[u8]) -> Result<Wor, LorawanError>
pub fn parse(bytes: &[u8]) -> Result<Wor, LorawanError>
Reads a wake-on-radio frame.
§Arguments
bytes- the frame the relay received.
§Returns
The frame. An uplink’s is still sealed; SealedWor::open checks and decrypts it.
§Errors
Returns LorawanError::MalformedFrame for a reserved or proprietary WOR type, which
TS011-1.0.1 section 5.3 has a relay discard, and for a frame whose length is not its
type’s.
Trait Implementations§
impl Copy for Wor
impl Eq for Wor
impl StructuralPartialEq for Wor
Auto Trait Implementations§
impl Freeze for Wor
impl RefUnwindSafe for Wor
impl Send for Wor
impl Sync for Wor
impl Unpin for Wor
impl UnsafeUnpin for Wor
impl UnwindSafe for Wor
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