pub fn update_token(user: &User, token: &str) -> UserExpand description
Populates the email token on a user
This uses a simple builder like pattern. In the future we will support a zero-copy version too.
ยงExample
use mail_tm_rs::user::User;
use mail_tm_rs::{create_account, update_token, token, domains};
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let user = User::default().with_domain(&domains().await?.any().domain);
let account = create_account(&user).await?;
let user = update_token(&user, &token(&user).await?.token);
Ok(())
}