Result<T, E>.from constructor
Result<T, E>.from (
- T? value,
- E err
Creates a Result
from the given nullable T
value.
Creates:
Implementation
factory Result.from(T? value, E err) => switch (value) {
null => Err(err),
_ => Ok(value)
};