pub struct DeliverPdu {
    pub sca: Option<PduAddress>,
    pub first_octet: DeliverPduFirstOctet,
    pub originating_address: PduAddress,
    pub dcs: DataCodingScheme,
    pub scts: SmscTimestamp,
    pub user_data: Vec<u8>,
    pub user_data_len: u8,
}
Expand description

An SMS-DELIVER PDU.

NB: For simple usage, you’ll only need to care about the originating_address field and the get_message_data method!

Fields§

§sca: Option<PduAddress>

Service centre address, if provided here.

§first_octet: DeliverPduFirstOctet

First octet (contains some extra fields).

§originating_address: PduAddress

Originating address (i.e. message sender).

§dcs: DataCodingScheme

Message data coding scheme.

§scts: SmscTimestamp

Message timestamp, from the service centre.

§user_data: Vec<u8>

User data.

§user_data_len: u8

User data length.

Implementations§

source§

impl DeliverPdu

source

pub fn get_message_data(&self) -> GsmMessageData

Get the actual data (i.e. text or binary content) of the message.

Methods on GsmMessageData let you convert this into actual text.

Trait Implementations§

source§

impl Clone for DeliverPdu

source§

fn clone(&self) -> DeliverPdu

Returns a copy of the value. Read more
1.0.0 · source§

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

Performs copy-assignment from source. Read more
source§

impl Debug for DeliverPdu

source§

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

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

impl PartialEq<DeliverPdu> for DeliverPdu

source§

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

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<'a> TryFrom<&'a [u8]> for DeliverPdu

§

type Error = HuaweiError

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

fn try_from(b: &[u8]) -> HuaweiResult<Self>

Performs the conversion.
source§

impl Eq for DeliverPdu

source§

impl StructuralEq for DeliverPdu

source§

impl StructuralPartialEq for DeliverPdu

Auto Trait Implementations§

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

source§

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

Mutably borrows from an owned value. 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 Twhere 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> ToOwned for Twhere T: Clone,

§

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 Twhere U: Into<T>,

§

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 Twhere U: TryFrom<T>,

§

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.