Struct huawei_modem::pdu::DeliverPdu
source · 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
impl DeliverPdu
sourcepub fn get_message_data(&self) -> GsmMessageData
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
impl Clone for DeliverPdu
source§fn clone(&self) -> DeliverPdu
fn clone(&self) -> DeliverPdu
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for DeliverPdu
impl Debug for DeliverPdu
source§impl PartialEq<DeliverPdu> for DeliverPdu
impl PartialEq<DeliverPdu> for DeliverPdu
source§fn eq(&self, other: &DeliverPdu) -> bool
fn eq(&self, other: &DeliverPdu) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl<'a> TryFrom<&'a [u8]> for DeliverPdu
impl<'a> TryFrom<&'a [u8]> for DeliverPdu
§type Error = HuaweiError
type Error = HuaweiError
The type returned in the event of a conversion error.
source§fn try_from(b: &[u8]) -> HuaweiResult<Self>
fn try_from(b: &[u8]) -> HuaweiResult<Self>
Performs the conversion.
impl Eq for DeliverPdu
impl StructuralEq for DeliverPdu
impl StructuralPartialEq for DeliverPdu
Auto Trait Implementations§
impl RefUnwindSafe for DeliverPdu
impl Send for DeliverPdu
impl Sync for DeliverPdu
impl Unpin for DeliverPdu
impl UnwindSafe for DeliverPdu
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