fromResult<T> static method
T
fromResult<T>(
- Result<
T> result
Gets the value of the given parse result
if it represents a Success
or throws a TomlParserException if it is a Failure
.
Implementation
static T fromResult<T>(Result<T> result) {
try {
return result.value;
} on ParserException catch (e) {
throw TomlParserException.from(e);
}
}