pub enum SendSms {
ToMany(ToMany),
PerRecipient(PerRecipient),
}Expand description
A validated “send SMS” request.
Use SendSms::to_many to send one message to many recipients, or
SendSms::per_recipient to send per-recipient messages.
Variants§
ToMany(ToMany)
One message to many recipients.
PerRecipient(PerRecipient)
Different messages per recipient.
Implementations§
Source§impl SendSms
impl SendSms
Sourcepub fn to_many(
recipients: Vec<RawPhoneNumber>,
msg: MessageText,
options: SendOptions,
) -> Result<Self, ValidationError>
pub fn to_many( recipients: Vec<RawPhoneNumber>, msg: MessageText, options: SendOptions, ) -> Result<Self, ValidationError>
Create a “one message to many recipients” request.
Constraints:
recipientsmust be non-emptyrecipients.len()must be<= SEND_SMS_MAX_RECIPIENTS(100)
Sourcepub fn per_recipient(
messages: BTreeMap<RawPhoneNumber, MessageText>,
options: SendOptions,
) -> Result<Self, ValidationError>
pub fn per_recipient( messages: BTreeMap<RawPhoneNumber, MessageText>, options: SendOptions, ) -> Result<Self, ValidationError>
Create a “per-recipient message” request.
Constraints:
messagesmust be non-emptymessages.len()must be<= SEND_SMS_MAX_RECIPIENTS(100)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SendSms
impl RefUnwindSafe for SendSms
impl Send for SendSms
impl Sync for SendSms
impl Unpin for SendSms
impl UnwindSafe for SendSms
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more