[−][src]Struct sendgrid::SGClient
This is the struct that allows you to authenticate to the SendGrid API. It's only field is the API key which allows you to send messages.
Methods
impl SGClient
[src]
pub fn new(key: String) -> SGClient
[src]
Makes a new SendGrid cient with the specified API key.
pub fn send(&self, mail_info: Mail) -> SendgridResult<String>
[src]
Sends a messages through the SendGrid API. It takes a Mail struct as an argument. It returns the string response from the API as JSON. It sets the Content-Type to be application/x-www-form-urlencoded.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for SGClient
impl Send for SGClient
impl Sync for SGClient
impl Unpin for SGClient
impl UnwindSafe for SGClient
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,