Crates.io | tempmail-lol |
lib.rs | tempmail-lol |
version | 0.1.0 |
source | src |
created_at | 2023-01-08 19:58:20.641044 |
updated_at | 2023-01-08 19:58:20.641044 |
description | API to generate temporary email addresses |
homepage | |
repository | https://github.com/Morb0/tempmail-lol |
max_upload_size | |
id | 753912 |
size | 37,812 |
Crate API wrapper for TempMail.lol service.
Install from crates.io. Add the following line to your Cargo.toml file's dependencies section:
[dependencies]
tempmail-lol = "0.1"
Library support async and sync functions.
fn main() -> Result<(), tempmail_lol::TempMailError> {
let inbox = tempmail_lol::create_inbox()?;
println!("Got random inbox: {:?}", inbox);
}
For async functions you need to use async
feature flag:
[dependencies]
tempmail-lol = { version = "0.1", features = ["async"] }
And then use any async runtime:
#[tokio::main]
async fn main() -> Result<(), tempmail_lol::TempMailError> {
let inbox = tempmail_lol::create_inbox_async().await?;
println!("Got random inbox: {:?}", inbox);
}
More examples you can find in examples
folder.