Enum huawei_modem::pdu::DataCodingScheme
source · pub enum DataCodingScheme {
Standard {
compressed: bool,
class: MessageClass,
encoding: MessageEncoding,
},
Reserved,
MessageWaitingDiscard {
waiting: bool,
type_indication: MessageWaitingType,
},
MessageWaiting {
waiting: bool,
type_indication: MessageWaitingType,
ucs2: bool,
},
}
Expand description
The data coding scheme of the message.
Basically, this enum
is a decoded 8-bit field that has a bunch of different cases, which is
why there are so many options here.
The meanings explained in the Huawei spec are very confusing and sometimes overlapping.
Use the encoding
method to figure out what encoding to use, which is probably the only real
use you’re going to have for this struct
anyway.
Variants§
Standard
Fields
class: MessageClass
The message class (flash SMS, stored to SIM only, etc.)
encoding: MessageEncoding
The message encoding (7-bit, UCS-2, 8-bit)
Standard coding scheme.
Reserved
Reserved value.
MessageWaitingDiscard
Fields
type_indication: MessageWaitingType
Type of message waiting.
Discard the message content, but display the message waiting indication to the user.
MessageWaiting
Fields
type_indication: MessageWaitingType
Type of message waiting.
Store the message content, and display the message waiting indication to the user.
Implementations§
source§impl DataCodingScheme
impl DataCodingScheme
sourcepub fn encoding(&self) -> MessageEncoding
pub fn encoding(&self) -> MessageEncoding
Determine which character encoding the message uses (i.e. GSM 7-bit, UCS-2, …)
(Some of these answers might be guesses.)
Trait Implementations§
source§impl Clone for DataCodingScheme
impl Clone for DataCodingScheme
source§fn clone(&self) -> DataCodingScheme
fn clone(&self) -> DataCodingScheme
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for DataCodingScheme
impl Debug for DataCodingScheme
source§impl From<u8> for DataCodingScheme
impl From<u8> for DataCodingScheme
source§impl Into<u8> for DataCodingScheme
impl Into<u8> for DataCodingScheme
source§impl PartialEq<DataCodingScheme> for DataCodingScheme
impl PartialEq<DataCodingScheme> for DataCodingScheme
source§fn eq(&self, other: &DataCodingScheme) -> bool
fn eq(&self, other: &DataCodingScheme) -> bool
self
and other
values to be equal, and is used
by ==
.