Crate some_to_err

source ·

Traits

  • The SomeErr trait provides a method for converting an Option into a Result by treating Some values as Err and None values as Ok.
  • The SomeToErrElse trait provides a convenient method to convert an Option<T> into a Result<OK, T> by supplying a closure that generates the OK value for the Result when the input is None.