Rust has no null! Instead, whenever a value might be absent, Rust uses Option<T> with two variants: Some(value) or None. The compiler forces you to handle the None case before using the value—eliminating null pointer crashes forever.
ADVERTISEMENT