numem.optional

Numem Optional type

Members

Functions

error
Result!T error(string message)

Creates an error result.

none
Option!T none()

Creates a "none" optional value type.

ok
Result!T ok(T value)

Wraps a value into a Result.

some
Option!T some(T value)

Wraps value in an Optional type.

Structs

Option
struct Option(T)

A struct which wraps a value and whether said value is "valid".

Result
struct Result(T)

A type which wraps a value and a potential error.

Meta

Authors

Luna Nielsen