pub struct Sender { /* private fields */ }
Expand description
Used to send a V3 message body.
Implementations§
source§impl Sender
impl Sender
sourcepub fn set_host<S: Into<String>>(&mut self, host: S)
pub fn set_host<S: Into<String>>(&mut self, host: S)
Sets the host to use for the API. This is useful if you are using a proxy or a local development server. It should be a full URL, including the protocol.
sourcepub async fn send(&self, mail: &Message) -> SendgridResult<Response>
pub async fn send(&self, mail: &Message) -> SendgridResult<Response>
Send a V3 message and return the HTTP response or an error.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Sender
impl !RefUnwindSafe for Sender
impl Send for Sender
impl Sync for Sender
impl Unpin for Sender
impl !UnwindSafe for Sender
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