Namespace RustyOptions
Classes
BoolExtensions
Provides extension methods for boolean values.
NumericOption
This class contains static methods for creation an Option<T>.
NumericOptionExtensions
Extension methods for the Option<T> type.
Option
This class contains static methods for creation an Option<T>.
OptionCollectionExtensions
Extension methods for using collections with Option<T>.
OptionExtensions
Extension methods for the Option<T> type.
OptionJsonExtensions
Extension methods for using System.Text.Json
types with Option<T>.
OptionResultExtensions
Extension methods that transform Option<T> to Result<T, TErr>, or vice-versa.
Result
This class contains static methods for creating a Result<T, TErr>.
ResultCollectionExtensions
Extension methods for working with collections involving Result<T, TErr>.
ResultExtensions
Extension methods for the Result<T, TErr> type.
Structs
NumericOption<T>
NumericOption<T> represents an optional number: every NumericOption<T> is either Some
and contains a number, or None
, and does not.
Option<T>
Option<T> represents an optional value: every Option<T> is either Some
and contains a value, or None
, and does not.
Result<T, TErr>
Result<T, TErr> is used to return the result of an operation that might fail, without
throwing an exception. Either IsOk(out T) will return true
and the contained result value,
or else IsErr(out TErr) will return true
and the contained error value.
Unit
A unit type is a type that allows only one value and holds no information. It can be used as a placeholder in a Result<T, TErr> that returns no data.
Delegates
TryGetValue<TKey, TValue>
Delegate that represents a fallible attempt to get a value associated with a given key.
TryGet<T>
Delegate that represents a fallible attempt to get a value of a given type.