Add support for Option::from() and Environment::tryGet()
Option::from simplifies the construction of Option types.
It allows nullable values (?T) to be converted into Option<T>:
- None when the value is null
- Some(value) otherwise
Example: Option::from(44) returns Some(44)
Environment::tryGet() is introduced to return an Option instead of throwing
an exception when querying an environment variable.
Environment::tryGet() returns an Option type instead of throwing an exception
when querying an environment variable. The existing Environment::get() method
remains unchanged and still throws an exception on failure.
Ref T2164
Differential Revision: https://devcentral.nasqueron.org/D3818