Hacker News new | ask | show | jobs
by arthurcolle 2068 days ago
so I take it Option is an optional type in Rust? What am I supposed to do if I want to create a financial Option type in Rust? Gotta rename it? ;)

Just kidding... unless... ?

2 comments

The point of the article is that you won’t have that type: at the very least you’d have a PutOption and a CallOption.
You can create and use Option without problem, your Option will be crate::Option, whereas Rust Option will be std::option::Option. std::option::Option<Option> works, yay.
I see, thanks. Really haven't ever used Rust for anything so didn't know exactly what namespacing was like. Sorry for the trite parent comment... :)