pub struct SendMessageRequest {
pub to: Recipients,
pub signature: Option<String>,
pub template_id: Option<String>,
pub template_data: Option<BTreeMap<String, Value>>,
pub content: Option<String>,
pub text: Option<String>,
}Expand description
Parameters accepted by sms.message.send.
Fields§
§to: RecipientsDestination phone number or phone numbers in E.164 format.
signature: Option<String>Message signature placed before or after content, depending on locale.
template_id: Option<String>Unimatrix message template ID.
template_data: Option<BTreeMap<String, Value>>Values substituted into the selected template.
content: Option<String>Message content without a signature.
text: Option<String>Complete message text, including any required signature.
Implementations§
Source§impl SendMessageRequest
impl SendMessageRequest
Sourcepub fn text(to: impl Into<Recipients>, text: impl Into<String>) -> Self
pub fn text(to: impl Into<Recipients>, text: impl Into<String>) -> Self
Creates a request whose text already includes the message signature.
Sourcepub fn template(
to: impl Into<Recipients>,
signature: impl Into<String>,
template_id: impl Into<String>,
) -> Self
pub fn template( to: impl Into<Recipients>, signature: impl Into<String>, template_id: impl Into<String>, ) -> Self
Creates a request using a message template.
Sourcepub fn content(
to: impl Into<Recipients>,
signature: impl Into<String>,
content: impl Into<String>,
) -> Self
pub fn content( to: impl Into<Recipients>, signature: impl Into<String>, content: impl Into<String>, ) -> Self
Creates a request using raw content and a separate signature.
Sourcepub fn with_template_data(self, data: BTreeMap<String, Value>) -> Self
pub fn with_template_data(self, data: BTreeMap<String, Value>) -> Self
Adds data used by a message template.
Trait Implementations§
Source§impl Clone for SendMessageRequest
impl Clone for SendMessageRequest
Source§fn clone(&self) -> SendMessageRequest
fn clone(&self) -> SendMessageRequest
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 SendMessageRequest
impl Debug for SendMessageRequest
Auto Trait Implementations§
impl Freeze for SendMessageRequest
impl RefUnwindSafe for SendMessageRequest
impl Send for SendMessageRequest
impl Sync for SendMessageRequest
impl Unpin for SendMessageRequest
impl UnsafeUnpin for SendMessageRequest
impl UnwindSafe for SendMessageRequest
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