pub struct SendGridProvider { /* private fields */ }Expand description
SendGrid email provider using reqwest HTTP client
Implementations§
Source§impl SendGridProvider
impl SendGridProvider
Sourcepub fn new(config: SendGridConfig) -> Result<Self, EmailError>
pub fn new(config: SendGridConfig) -> Result<Self, EmailError>
Create new SendGrid provider
Trait Implementations§
Source§impl Clone for SendGridProvider
impl Clone for SendGridProvider
Source§fn clone(&self) -> SendGridProvider
fn clone(&self) -> SendGridProvider
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 EmailProvider for SendGridProvider
impl EmailProvider for SendGridProvider
Source§fn send<'life0, 'life1, 'async_trait>(
&'life0 self,
email: &'life1 Email,
) -> Pin<Box<dyn Future<Output = Result<EmailResult, EmailError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn send<'life0, 'life1, 'async_trait>(
&'life0 self,
email: &'life1 Email,
) -> Pin<Box<dyn Future<Output = Result<EmailResult, EmailError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Send an email immediately
Source§fn validate_config<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), EmailError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn validate_config<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), EmailError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Validate configuration
Source§fn provider_name(&self) -> &'static str
fn provider_name(&self) -> &'static str
Get provider name
Auto Trait Implementations§
impl Freeze for SendGridProvider
impl !RefUnwindSafe for SendGridProvider
impl Send for SendGridProvider
impl Sync for SendGridProvider
impl Unpin for SendGridProvider
impl !UnwindSafe for SendGridProvider
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