Struct huawei_modem::gsm_encoding::GsmMessageData
source · pub struct GsmMessageData { /* private fields */ }
Expand description
The ‘data’ portion of an SMS message - i.e. the text, for a simple message.
Implementations§
source§impl GsmMessageData
impl GsmMessageData
sourcepub fn encoding(&self) -> &MessageEncoding
pub fn encoding(&self) -> &MessageEncoding
Get the message encoding.
sourcepub fn user_data_len(&self) -> u8
pub fn user_data_len(&self) -> u8
Get the user data length.
sourcepub fn decode_message(&self) -> HuaweiResult<DecodedMessage>
pub fn decode_message(&self) -> HuaweiResult<DecodedMessage>
Attempt to decode this message.
sourcepub fn encode_message(msg: &str) -> Vec<GsmMessageData>
pub fn encode_message(msg: &str) -> Vec<GsmMessageData>
Encode an arbitrary string of text into one, or multiple, GSM message data segments.
If this function returns more than one bit of data, it means it’s been split into multiple
concatenated parts for you, and you’ll need to send each part individually in order, as
part of a new Pdu
to your desired recipient.
Trait Implementations§
source§impl Clone for GsmMessageData
impl Clone for GsmMessageData
source§fn clone(&self) -> GsmMessageData
fn clone(&self) -> GsmMessageData
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 moreAuto Trait Implementations§
impl RefUnwindSafe for GsmMessageData
impl Send for GsmMessageData
impl Sync for GsmMessageData
impl Unpin for GsmMessageData
impl UnwindSafe for GsmMessageData
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