Skip to main content

Crate tempmail_sdk

Crate tempmail_sdk 

Source
Expand description

临时邮箱 SDK (Rust) 支持 268 个 channel 标识,按 100 个独立服务商归并,所有渠道返回统一标准化格式

Re-exports§

pub use config::block_on;
pub use config::get_config;
pub use config::get_current_ua;
pub use config::http_client;
pub use config::set_config;
pub use config::SDKConfig;
pub use logger::set_log_level;
pub use normalize::normalize_email;
pub use registry::all_channels;
pub use registry::get_channel_info;
pub use registry::list_channels;
pub use retry::with_retry;
pub use webui::start_webui;
pub use webui::start_webui_if_enabled;
pub use types::*;

Modules§

channel_domains
渠道域名映射模块 用于根据邮箱后缀/域名筛选可用渠道
config
logger
SDK 日志模块 基于 log crate 实现,用户可通过 set_log_level 设置级别 默认静默不输出
normalize
邮件数据标准化模块 将各提供商返回的原始邮件数据标准化为统一的 Email 格式
providers
临时邮箱服务提供商实现 仅导出公开入口仍在使用的 provider 模块
registry
渠道注册表
retry
通用重试工具 提供请求重试、超时控制、指数退避等错误恢复机制
types
SDK 类型定义
webui
WebUI 嵌入式 HTTP 服务器

Structs§

TempEmailClient
临时邮箱客户端

Enums§

LogLevelFilter
An enum representing the available verbosity level filters of the logger.

Functions§

generate_email
创建临时邮箱
get_emails
获取邮件列表 Channel/Email/Token 等由 SDK 从 EmailInfo 中自动获取,用户无需手动传递
sdk_version