Skip to main content

Delivery

Struct Delivery 

Source
pub struct Delivery { /* private fields */ }
Expand description

A downlink, read and acted on.

Implementations§

Source§

impl Delivery

Source

pub fn port(&self) -> Option<u8>

Returns the application port the payload arrived on.

§Returns

The port, or None for a frame that carried only MAC commands or nothing.

Source

pub fn payload(&self) -> &[u8] ⓘ

Returns the application payload, decrypted.

§Returns

The bytes, empty when the frame carried none for the application.

Source

pub fn acknowledged(&self) -> bool

Reports whether the network acknowledged the confirmed uplink this answered.

§Returns

true for an acknowledgment of a confirmed uplink.

Source

pub fn confirmed(&self) -> bool

Reports whether the network asked for this downlink to be acknowledged.

The device sets the acknowledgment on its next uplink by itself. A device with nothing to send soon can send an empty frame with send_empty.

§Returns

true for a confirmed downlink.

Source

pub fn more_pending(&self) -> bool

Reports whether the network has more waiting.

TS001-1.0.4 section 4.3.1.4 lets the device send an uplink as soon as it can to collect it.

§Returns

The FPending bit.

Returns the answer to a link check the device asked for.

§Returns

The margin and gateway count, when the downlink carried them.

Source

pub fn device_time(&self) -> Option<DeviceTime>

Returns the answer to a time request the device asked for.

§Returns

The network’s time, when the downlink carried it.

Trait Implementations§

Source§

impl Clone for Delivery

Source§

fn clone(&self) -> Delivery

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for Delivery

Source§

impl Debug for Delivery

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for Delivery

Source§

impl PartialEq for Delivery

Source§

fn eq(&self, other: &Delivery) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for Delivery

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.