result module

Maylang standard-library module.

import "result" as result;

Functions

ok

may
fun ok<T>(value: T) -> Result<T, Never>

No description yet. Read the declaration source for the exact contract.

supported · full runtime · source

error

may
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

may
fun is_ok<T, E>(r: Result<T, E>) -> Bool

No description yet. Read the declaration source for the exact contract.

supported · full runtime · source

is_err

may
fun is_err<T, E>(r: Result<T, E>) -> Bool

No description yet. Read the declaration source for the exact contract.

supported · full runtime · source

unwrap

may
fun unwrap<T, E>(r: Result<T, E>) -> T

No description yet. Read the declaration source for the exact contract.

supported · full runtime · source

unwrap_or

may
fun unwrap_or<T, E>(r: Result<T, E>, fallback: T) -> T

No description yet. Read the declaration source for the exact contract.

supported · full runtime · source

map_result

may
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

may
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

may
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

may
fun attempt<T>(f: () -> T) -> Result<T, Str>

No description yet. Read the declaration source for the exact contract.

supported · full runtime · source