How large are the overheads of Option<T> in Rust compared to null pointers?
Hi everyone! I've just started learning Rust, coming from C++. There I was used to using nullptr or NULL to indicate the absence of a value. In Rust, they use Option instead, and I'm wondering: how expensive is this? In C++, a null pointer is just 0, with no additional overhead.\n\nFor example, I have a struct like this:\n\n```rust\nstruct Node {\n value: i32,\n left: Option>,\n right: Option>,\n}\n```\n\nIf I set `left: None`, Rust must store a flag somewhere that says this is None. Does this mean each Option takes up more memory than a raw pointer? Or does the compiler optimize this somehow?\n\nI tried checking the size:\n\n```rust\nuse std::mem::size_of;\n\nfn main() {\n println!("{}", size_of::