pub struct BindResponse {
pub sequence_number: u32,
pub command_status: u32,
pub status_description: String,
pub command_id: u32,
pub system_id: String,
pub optional_params: Vec<u8>,
}Expand description
Represents a Bind Response PDU.
Sent by the SMSC in response to a Bind Request.
Fields§
§sequence_number: u32Sequence number of the PDU
command_status: u32Command Status (0 = OK, others = Error)
status_description: StringHuman-readable description of status
command_id: u32Command ID (e.g., 0x80000009 for bind_transceiver_resp)
system_id: StringSystem ID identifying the SMSC
optional_params: Vec<u8>Optional TLV parameters
Implementations§
Source§impl BindResponse
impl BindResponse
Sourcepub fn new(
sequence_number: u32,
command_id: u32,
status_name: &str,
system_id: String,
) -> Self
pub fn new( sequence_number: u32, command_id: u32, status_name: &str, system_id: String, ) -> Self
Create a new Bind Response.
§Examples
use smpp_codec::pdus::BindResponse;
use smpp_codec::common::{CMD_BIND_TRANSCEIVER_RESP, BindMode};
let sequence_number: u32 = 1;
let resp = BindResponse::new(
sequence_number,
CMD_BIND_TRANSCEIVER_RESP,
"ESME_ROK",
"system_id".to_string()
);Trait Implementations§
Source§impl Clone for BindResponse
impl Clone for BindResponse
Source§fn clone(&self) -> BindResponse
fn clone(&self) -> BindResponse
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 BindResponse
impl Debug for BindResponse
Source§impl PartialEq for BindResponse
impl PartialEq for BindResponse
impl StructuralPartialEq for BindResponse
Auto Trait Implementations§
impl Freeze for BindResponse
impl RefUnwindSafe for BindResponse
impl Send for BindResponse
impl Sync for BindResponse
impl Unpin for BindResponse
impl UnwindSafe for BindResponse
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