pub struct SmsRequest<'a> {
pub api_key: &'a str,
pub sender: &'a str,
pub number: &'a str,
pub text: &'a str,
pub time: Option<DateTime<Utc>>,
pub dlr_url: Option<&'a str>,
pub expired: Option<i32>,
pub flags: SmsFlags,
pub user_key: Option<&'a str>,
pub encoding: Encoding,
}Expand description
Request structure for sending SMS
Fields§
§api_key: &'a str§sender: &'a str§number: &'a str§text: &'a str§time: Option<DateTime<Utc>>§dlr_url: Option<&'a str>§expired: Option<i32>§flags: SmsFlags§user_key: Option<&'a str>§encoding: EncodingImplementations§
Source§impl<'a> SmsRequest<'a>
impl<'a> SmsRequest<'a>
Sourcepub fn new(
api_key: &'a str,
sender: &'a str,
number: &'a str,
text: &'a str,
) -> Self
pub fn new( api_key: &'a str, sender: &'a str, number: &'a str, text: &'a str, ) -> Self
Create a new SMS request with required parameters
Sourcepub fn with_dlr_url(self, dlr_url: &'a str) -> Self
pub fn with_dlr_url(self, dlr_url: &'a str) -> Self
Set delivery report URL
Sourcepub fn with_expired(self, expired: i32) -> Self
pub fn with_expired(self, expired: i32) -> Self
Set expiration time in minutes
Sourcepub fn with_flags(self, flags: SmsFlags) -> Self
pub fn with_flags(self, flags: SmsFlags) -> Self
Set SMS flags
Sourcepub fn with_user_key(self, user_key: &'a str) -> Self
pub fn with_user_key(self, user_key: &'a str) -> Self
Set user key for tracking
Sourcepub fn with_encoding(self, encoding: Encoding) -> Self
pub fn with_encoding(self, encoding: Encoding) -> Self
Set encoding
Auto Trait Implementations§
impl<'a> Freeze for SmsRequest<'a>
impl<'a> RefUnwindSafe for SmsRequest<'a>
impl<'a> Send for SmsRequest<'a>
impl<'a> Sync for SmsRequest<'a>
impl<'a> Unpin for SmsRequest<'a>
impl<'a> UnsafeUnpin for SmsRequest<'a>
impl<'a> UnwindSafe for SmsRequest<'a>
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