pub struct SendRequest<'a> {
pub to: &'a str,
pub from: &'a str,
pub text: &'a str,
}Expand description
A borrowing SMS send request.
This is the type accepted by SmsClient::send. It borrows its string
fields to avoid allocations on the hot path. If you need an owned variant
that can live across .await points, see OwnedSendRequest.
Fields§
§to: &'a strE.164 destination phone number, e.g. "+14155551234".
from: &'a strE.164 sender / originating number, or an alphanumeric sender ID.
text: &'a strThe message body (plain text).
Trait Implementations§
Source§impl<'a> Clone for SendRequest<'a>
impl<'a> Clone for SendRequest<'a>
Source§fn clone(&self) -> SendRequest<'a>
fn clone(&self) -> SendRequest<'a>
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<'a> Debug for SendRequest<'a>
impl<'a> Debug for SendRequest<'a>
Source§impl<'de: 'a, 'a> Deserialize<'de> for SendRequest<'a>
impl<'de: 'a, 'a> Deserialize<'de> for SendRequest<'a>
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<'a> From<&'a OwnedSendRequest> for SendRequest<'a>
impl<'a> From<&'a OwnedSendRequest> for SendRequest<'a>
Source§fn from(req: &'a OwnedSendRequest) -> Self
fn from(req: &'a OwnedSendRequest) -> Self
Converts to this type from the input type.
Source§impl<'a> From<SendRequest<'a>> for OwnedSendRequest
impl<'a> From<SendRequest<'a>> for OwnedSendRequest
Source§fn from(req: SendRequest<'a>) -> Self
fn from(req: SendRequest<'a>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<'a> Freeze for SendRequest<'a>
impl<'a> RefUnwindSafe for SendRequest<'a>
impl<'a> Send for SendRequest<'a>
impl<'a> Sync for SendRequest<'a>
impl<'a> Unpin for SendRequest<'a>
impl<'a> UnsafeUnpin for SendRequest<'a>
impl<'a> UnwindSafe for SendRequest<'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