pub struct AlertNotification {
pub sequence_number: u32,
pub source_addr_ton: Ton,
pub source_addr_npi: Npi,
pub source_addr: String,
pub esme_addr_ton: Ton,
pub esme_addr_npi: Npi,
pub esme_addr: String,
pub optional_params: Vec<Tlv>,
}Expand description
Represents an Alert Notification PDU.
Sent by the SMSC to the ESME to provide information about a message state (e.g., delivered).
Fields§
§sequence_number: u32Sequence number of the PDU
source_addr_ton: TonSource Address Type of Number
source_addr_npi: NpiSource Address Numbering Plan Indicator
source_addr: StringSource Address (Sender)
esme_addr_ton: TonESME Address Type of Number
esme_addr_npi: NpiESME Address Numbering Plan Indicator
esme_addr: StringESME Address (Receiver)
optional_params: Vec<Tlv>Optional TLVs
Implementations§
Source§impl AlertNotification
impl AlertNotification
Sourcepub fn new(sequence_number: u32, source_addr: String, esme_addr: String) -> Self
pub fn new(sequence_number: u32, source_addr: String, esme_addr: String) -> Self
Create a new Alert Notification.
§Examples
use smpp_codec::pdus::AlertNotification;
let sequence_number: u32 = 1;
let alert = AlertNotification::new(
sequence_number,
"source_addr".to_string(),
"esme_addr".to_string()
);Sourcepub fn with_source_addr(self, ton: Ton, npi: Npi, addr: String) -> Self
pub fn with_source_addr(self, ton: Ton, npi: Npi, addr: String) -> Self
Builder for setting Source Address TON/NPI/Address.
Sourcepub fn with_esme_addr(self, ton: Ton, npi: Npi, addr: String) -> Self
pub fn with_esme_addr(self, ton: Ton, npi: Npi, addr: String) -> Self
Builder for setting ESME Address TON/NPI/Address.
Trait Implementations§
Source§impl Clone for AlertNotification
impl Clone for AlertNotification
Source§fn clone(&self) -> AlertNotification
fn clone(&self) -> AlertNotification
Returns a duplicate 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 AlertNotification
impl Debug for AlertNotification
Source§impl PartialEq for AlertNotification
impl PartialEq for AlertNotification
impl StructuralPartialEq for AlertNotification
Auto Trait Implementations§
impl Freeze for AlertNotification
impl RefUnwindSafe for AlertNotification
impl Send for AlertNotification
impl Sync for AlertNotification
impl Unpin for AlertNotification
impl UnwindSafe for AlertNotification
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