result module
Maylang standard-library module.
import "result" as result;
Functions
ok
fun ok<T>(value: T) -> Result<T, Never>No description yet. Read the declaration source for the exact contract.
supported · full runtime · source
error
fun error<E>(message: E) -> Result<Never, E>No description yet. Read the declaration source for the exact contract.
supported · full runtime · source
is_ok
fun is_ok<T, E>(r: Result<T, E>) -> BoolNo description yet. Read the declaration source for the exact contract.
supported · full runtime · source
is_err
fun is_err<T, E>(r: Result<T, E>) -> BoolNo description yet. Read the declaration source for the exact contract.
supported · full runtime · source
unwrap
fun unwrap<T, E>(r: Result<T, E>) -> TNo description yet. Read the declaration source for the exact contract.
supported · full runtime · source
unwrap_or
fun unwrap_or<T, E>(r: Result<T, E>, fallback: T) -> TNo description yet. Read the declaration source for the exact contract.
supported · full runtime · source
map_result
fun map_result<T, U, E>(r: Result<T, E>, f: (T) -> U) -> Result<U, E>No description yet. Read the declaration source for the exact contract.
supported · full runtime · source
and_then
fun and_then<T, U, E>(r: Result<T, E>, f: (T) -> Result<U, E>) -> Result<U, E>No description yet. Read the declaration source for the exact contract.
supported · full runtime · source
collect
fun collect<T, E>(results: List<Result<T, E>>) -> Result<List<T>, E>No description yet. Read the declaration source for the exact contract.
supported · full runtime · source
attempt
fun attempt<T>(f: () -> T) -> Result<T, Str>No description yet. Read the declaration source for the exact contract.
supported · full runtime · source