Releases: jtmueller/RustyOptions
bool.Then()
.NET 8
0.9.0: SelectWhere
Do you want to both transform values into other types, and filter them at the same time? Now you can, with SelectWhere!
var strings = new[] { "1", "two", "NaN", "four", "5", "six", "7", "eight", "9", "10" };
var ints = strings.SelectWhere(Option.Parse<int>);
Assert.Equal(new[] { 1, 5, 7, 9, 10 }, ints);
0.8.0: Documentation and API Completion
This release adds more-complete API documentation, and fills in a few missing API methods in collection support and F# conversion.
0.7.0: Adding a Unit type
This release adds the Unit type, which is needed for Result
-returning methods that might error, but do not return a value if successful. Supports JSON serialization and conversion to ValueTuple
and the F# unit
.
FSharp.Core version sync
Previous release was targeting FSharp.Core 7.0 in the .NET 6 version. This version now targets FSharp.Core 6.0, while the .NET 7 version targets FSharp.Core 7.0
F# Conversion Support
This release adds the RustyOptions.FSharp
package, allowing easier interop between C# code using RustyOptions, and F# code using the built-in Option
, ValueOption
, and Result
types.
JSON Serialization Support
This release adds JSON Serialization support (System.Text.Json only, sorry Newtonsoft) and Option.ParseEnum<T>
.
Minor breaking change: Because the default
value of the Result
struct is in the Err
state, but the actual error value will be set to the default value for the error type, we cannot prevent the error value from being null in this specific circumstance. As a result, the Result.IsErr
method has had its nullable reference type annotations adjusted to reflect this reality. You may have to check error values for null or assert they are non-null with the !
operator in cases where you previously did not.
What's Changed
- JSON Serialization Support by @jtmueller in #13
Full Changelog: 0.4.0...0.5.0
0.4.0: Async Support (#12)
Adding Async and IAsyncEnumerable support.