get_email

Function get_email 

Source
pub fn get_email(prompt: &str) -> String
Expand description

Prompts the user to enter an email address and returns it as a string.

The function ensures that the email address is valid and has the correct format.

ยงExamples

use rust_input_lib::get_email;

let email = get_email("Enter your email address: ");
println!("Your email address is: {}", email);