laravel-rust 0.1.0

Laravel for Rust: a full-stack Rust web framework, inspired by PHP Laravel
Documentation
//! Send email through Resend, Amazon SES, or a transport of your own.
//!
//! Most applications email their users, with an order confirmation or a password reset link. A
//! [`Mailable`] builds a [`Message`]. `mail::to` names the recipients, and `send`, `queue`, or
//! `send_background` sends it:
//!
//! ```no_run
//! use laravel::mail::{self, Mailable, Message};
//! use laravel::view::{data, view};
//!
//! struct OrderShipped { order_id: u64 }
//!
//! impl Mailable for OrderShipped {
//!     fn build(&self) -> laravel::Result<Message> {
//!         Ok(Message::new()
//!             .subject(format!("Order #{} has shipped", self.order_id))
//!             .view(view("mail.order-shipped", data! { order_id => self.order_id })))
//!     }
//! }
//!
//! # async fn example() -> laravel::Result<()> {
//! mail::to("taylor@laravel.com").send(OrderShipped { order_id: 42 }).await?;
//! mail::to("taylor@laravel.com").queue(OrderShipped { order_id: 42 }).await?;
//! mail::to("taylor@laravel.com").send_background(OrderShipped { order_id: 42 })?;
//! # Ok(()) }
//! ```
//!
//! Each send renders the message into an [`Email`] before it returns, so a view that fails to
//! render or an invalid address fails the send. Named mailers choose the transport. The
//! `MAIL_MAILER` variable selects the default. The [mail guide] covers configuration, mail views,
//! and testing with [`fake`](fake()).
//!
//! # Tracing
//!
//! Laravel traces mail for every transport:
//!
//! | Span | Attributes |
//! | --- | --- |
//! | `mail.render`, for each `send`, `send_background`, `queue`, and `render` | `mail.mailable`, the mailable's type name, and `mail.message.id` |
//! | `mail.send`, for each transport call | `mail.mailer`, `mail.transport`, `mail.message.id`, `mail.recipients` as a count, and `mail.provider.message_id` when the provider returns one. An error marks the span as failed |
//!
//! Spans carry IDs and counts, not addresses, subjects, or bodies. A failover mailer adds a
//! `mail.send` span for each mailer it tries. Each successful send also writes a `debug` line under
//! the `laravel::mail` target, with the mailer, the email's ID, and the provider's message ID.
//!
//! [mail guide]: https://github.com/laravel/rust-framework/blob/0.x/docs/mail.md

pub(crate) use laravel_notifications::mail::*;
#[doc(inline)]
pub use laravel_notifications::mail::{
    Address, Attachment, Body, Drivers, Email, MailFake, Mailable, MailerDefinition, Message, PendingMail,
    PendingQueue, PendingSend, QueuedEmail, Recipients, SentEmail, SentMessage, Transport, TransportOption, fake,
    mailer, queue, render, resend, send, send_background, to,
};