pub struct SmsMessage {
pub from: Option<String>,
pub body: String,
pub to: Option<String>,
pub source: Option<String>,
pub schedule: Option<i64>,
pub custom_string: Option<String>,
pub list_id: Option<i64>,
pub country: Option<String>,
pub from_email: Option<String>,
}Expand description
A single SMS to be sent.
Build with SmsMessage::new then chain optional setters. Wrap in
SmsMessageCollection to send.
Fields§
§from: Option<String>Sender ID — alphanumeric (e.g. "MyBrand") or E.164 number you own.
If None, ClickSend picks a shared number.
body: StringMessage text. Long messages get split into parts and billed per part.
to: Option<String>Recipient in E.164 (+15551234567). Either this or Self::list_id.
source: Option<String>Free-form tag of where this came from (e.g. "rust"). Defaults to "rust".
schedule: Option<i64>Unix timestamp for scheduled send. None = immediate.
custom_string: Option<String>Your reference id; echoed back in delivery receipts and replies.
list_id: Option<i64>Send to a saved contact list instead of Self::to.
country: Option<String>ISO country (e.g. "US") — improves routing for some numbers.
from_email: Option<String>Where replies should be emailed.
Implementations§
Trait Implementations§
Source§impl Clone for SmsMessage
impl Clone for SmsMessage
Source§fn clone(&self) -> SmsMessage
fn clone(&self) -> SmsMessage
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 SmsMessage
impl Debug for SmsMessage
Source§impl Default for SmsMessage
impl Default for SmsMessage
Source§fn default() -> SmsMessage
fn default() -> SmsMessage
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for SmsMessage
impl RefUnwindSafe for SmsMessage
impl Send for SmsMessage
impl Sync for SmsMessage
impl Unpin for SmsMessage
impl UnsafeUnpin for SmsMessage
impl UnwindSafe for SmsMessage
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