pub struct Mailer { /* private fields */ }Expand description
Only resolved as an argument: a handler’s mails are sent once its outcome commits.
Implementations§
Source§impl Mailer
impl Mailer
Sourcepub fn body(&self, key: &str, data: &(impl Show + ?Sized)) -> Result<Body>
pub fn body(&self, key: &str, data: &(impl Show + ?Sized)) -> Result<Body>
The app’s template at src/mails/<name>.html of a module, keyed <module>/<name>.
Sourcepub fn body_from(
&self,
template: &Template,
data: &(impl Show + ?Sized),
) -> Result<Body>
pub fn body_from( &self, template: &Template, data: &(impl Show + ?Sized), ) -> Result<Body>
A crate’s own template, unless the app replaces it with one of the same key.
pub fn link(&self, path: &str) -> Result<String>
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Mailer
impl !UnwindSafe for Mailer
impl Freeze for Mailer
impl Send for Mailer
impl Sync for Mailer
impl Unpin for Mailer
impl UnsafeUnpin for Mailer
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