[−][src]Function deep_learning_playground::utils::natural_transform::opt_to_failure
pub fn opt_to_failure<T>(x: Option<T>, s: &str) -> Result<T, Error>
opt_to_failure
is a natural transformation that convers Option<...>
to
Result<..., Error>
.
Arguments
x
-Option<T>
- s -
&str