Rust

message

Module

The messages adapters send: Email, Sms, Push and Discord.

Contents

1 submodule, and what the module defines itself.

use utopia_messaging::Attachment;
Rust
pub struct Attachment

A file attached to an email: read from path, or content when given.

use utopia_messaging::Discord;
Rust
pub struct Discord

A message posted to a Discord webhook.

use utopia_messaging::Email;
Rust
pub struct Email

An email, validated when built: every address must be deliverable, display names single-line, and extra headers well formed.

use utopia_messaging::EmailBuilder;
Rust
pub struct EmailBuilder

Builds an Email.

use utopia_messaging::Mailbox;
Rust
pub struct Mailbox

A validated recipient: an address and its display name, if any.

use utopia_messaging::Push;
Rust
pub struct Push

A push notification.

use utopia_messaging::PushBuilder;
Rust
pub struct PushBuilder(Push)

Builds a Push.

use utopia_messaging::Sms;
Rust
pub struct Sms

A text message.

use utopia_messaging::Message;
Rust
pub enum Message

Any message, as send() takes it.

Also implements From.
use utopia_messaging::MessageType;
Rust
pub enum MessageType

Which kind of message an adapter sends.

use utopia_messaging::Priority;
Rust
pub enum Priority

How urgently a push notification is delivered.

use utopia_messaging::Recipient;
Rust
pub enum Recipient

A recipient as given to [EmailBuilder]: a bare address, or an entry with an address and an optional display name.

Also implements From.

message::class

Own page
Rust
pub const DISCORD: &str = "Utopia\\Messaging\\Messages\\Discord"

Undocumented.

Rust
pub const EMAIL: &str = "Utopia\\Messaging\\Messages\\Email"

Undocumented.

Rust
pub const PUSH: &str = "Utopia\\Messaging\\Messages\\Push"

Undocumented.

Rust
pub const SMS: &str = "Utopia\\Messaging\\Messages\\SMS"

Undocumented.