pub struct SendGridController { /* private fields */ }Implementations§
Source§impl SendGridController
impl SendGridController
Sourcepub fn new() -> Option<Self>
pub fn new() -> Option<Self>
Get a SendGridController, pulling from environment variables, returning None if the env vars aren’t present.
Sourcepub async fn send_recovery_email(
&self,
email: &str,
code: &str,
identity: &str,
link: bool,
) -> Result<(), Error>
pub async fn send_recovery_email( &self, email: &str, code: &str, identity: &str, link: bool, ) -> Result<(), Error>
§Description
Sends a recovery email to the provided email address.
§Arguments
email- The email to send the recovery email tocode- The recovery code to sendidentity- The identity the user is trying to recoverlink- Whether or not this request originated from the website. Typically if a user is attempting to login to the website, we will send them a link to click on instead of giving them a recovery code.
Trait Implementations§
Source§impl Clone for SendGridController
impl Clone for SendGridController
Source§fn clone(&self) -> SendGridController
fn clone(&self) -> SendGridController
Returns a copy 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 moreAuto Trait Implementations§
impl Freeze for SendGridController
impl !RefUnwindSafe for SendGridController
impl Send for SendGridController
impl Sync for SendGridController
impl Unpin for SendGridController
impl !UnwindSafe for SendGridController
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