Nullability - Rust

fn print(s: String) {
    println!("{s}");
    println!("{}", s.len());
}
fn print(s: String) {
    println!("{s}");
    println!("{}", s.len());
}
fn main() {
print();
}
fn print(s: String) {
    println!("{s}");
    println!("{}", s.len());
}

fn main() {
print(None);
}
fn print(s: String) {
    println!("{s}");
    println!("{}", s.len());
}


fn main() {
print("hello".into());
}

Accepting "nothing"

fn print(s_opt: Option<String>) {
    match s_opt {
        None => println!("nothing!"),
        Some(s) => {
            println!("{s}");
            println!("{}", s.len());
        }
    }
}

fn main() {
    print(None);
    print(Some("hello".into()));
}