nidula 2.0.1
nidula: ^2.0.1 copied to clipboard
A Dart library for Rust-like Option/Result types, providing a structured approach to error handling.
2.0.1 #
- Update package description.
- Update examples.
2.0.0 #
- Removed None/Err propagation support in order to simplify API.
- Renamed
PanictoUnwrapError. - Update package description.
1.1.0 #
- Add
Nesttype.
1.0.3 #
- Shortened project description, due to
pub.devconsidering it too long.
1.0.2 #
- Improved project description.
- Made small adjustments to vscode snippets.
1.0.1 #
- Fixed typo in docs.
1.0.0 #
- Exported chaining methods at library level.
- Accidentally forgotten in version 0.7.0.
- Changed return type of
chain/chainSyncchaining methods to a generic type of your choiceA. - Included
onAny/onAnySyncchaining methods. - Corrected chaining extension names for
Option<T>andFuture<Option<T>>. - Improved docs.
- For Nix devs: updated flake. Some pull requests that enormously improve Flutter/Dart support were recently merged (nixpkgs).
- Moved repository to Codeberg.
0.7.0 #
- Renamed
syncTryScopeto justtryScope. - Included chaining methods (
chain,onOk,onSome, ...). - Improved docstring.
- Updated VSCode snippets.
0.6.0 #
- Majorly improved docstring throughout entire codebase.
- Improved docs.
- Removed
Option.mapOrNull,Result.mapOrNullandResult.mapErrOrNull. - Removed
Option.unwrapOrNull. - Replaced
Result.unwrapOrNullandResult.unwrapErrOrNullwith ,Result.okToNullableandResult.errToNullable. - Improved
Result.toJsonandOption.toJsontype-safety-wise (transformers are now required).
0.5.0 #
- Made
Option'sTandResult'sTandEnullable. - Added extensions for all
*orNullmethods.- These methods are available only with non-nullable types, e.g., types extending
Object.
- These methods are available only with non-nullable types, e.g., types extending
- Added more pattern matching snippets.
- Added
toJsonmethods andfromJsonstatic methods. - Updated documentation.
0.4.2 #
- Added snippets section.
- Improved documentation.
- Corrected information in docstring.
0.4.1 #
- Improved documentation.
0.4.0 #
- Changed return type of
Option.mapOr,Option.mapOrElse,Result.mapOr,Result, mapOrElseto justU. - Added
Option.mapOrNull,Result.mapOrNullandResult.mapErrOrNull. - Added
Option.filter. - Improved documentation.
0.3.0 #
- Added
Option.unwrapOrNull,Result.unwrapOrNull, andResult.unwrapErrOrNull. - Added
zipOp. - Renamed extensions so that they do not start with
ResultorOption.- When using autocomplete, this way they are less relevant.
- Removed
Option.unwrapOrDefaultandResult.unwrapOrDefault, which do not make sense in Dart due to absence of default value.
0.2.3 #
- Improved examples.
0.2.2 #
- Added
matchmethod toOptionandResult.
0.2.1 #
- Added explanation on how to achieve functionality similar to Rust's
Fromtrait for error conversion before propagation. - Updated documentation.
0.2.0 #
- Renamed try operator components.
unwrapOrPropagateErrandunwrapOrPropagateNonewere renamed totry_.syncErrPropagationScope/asyncErrPropagationScopeandsyncNonePropagationScope/asyncNonePropagationScopewere renamed tosyncTryScope/asyncTryScope.- Token variable names default to
ntandet(previouslytfor both cases).
- Renamed
fromtofromNullable, addedtoNullable. - Updated documentation.
0.1.3 #
- Improved documentation.
0.1.2 #
- Improved documentation.
- Improved docstring.
- Included
einunwrap's Panic message. - Updated
toStringmethod ofNonePropagationandErrPropagation.
0.1.1 #
- Improved documentation.
- Added "Parallel to Rust's try-operator implementation" subsections.
- Added "Nested options and comparison to nullable types" subsection.
- Fixed typos.
0.1.0 #
- Renamed most classes and methods and static methods. Names are longer, but much more obvious:
propwas renamed tounwrapOrPropagateErrandunwrapOrPropagateNone.catchProp/catchPropAsyncwere renamed tosyncErrPropagationScope/asyncErrPropagationScopeandsyncNonePropagationScope/asyncNonePropagationScope.ResultPropErrorwas renamed toErrPropagation. Same forOptionPropError, which was renamed toNonePropagation.ResultPropTokenwas renamed toErrPropagationToken. Same forOptionPropToken, which was renamed toNonePropagationToken.
- Added
Propagationabstract class. - Improved and refactored tests.
- Improved docstring.
- Improved README.
0.0.3 #
- Added try-catch warning to README.
- Added more code to
nidula_example.dart. - Small fix to example in README.
0.0.2 #
- Uploaded again to fix repository URL detection.
0.0.1 #
- Initial version.
- Forked from
option_result, bringing the following enhancements:- Try-operator implementation rewritten from scratch.
- Compile time safety through propagation tokens.
- Chainable.
- Simpler and clearer library-internal error handling strategy.
TandEtypes must extendObject(thus, non-null values are prohibited).- This enforces composition with
Optiontypes (Option<T>) instead of nullable types (T?).
- This enforces composition with
- Only
T vandE efields (and, thus, getters) are available.value,val,erranderroraliases were removed.
- There is only a single public library to import components from.
- Final modifiers to prevent extending
Ok,Err,SomeandNone. ==operator takes all generic types into consideration when comparingOptionobjects andResultobjects.- Added variable names to all function parameters in types
- Callback autocomplete outputs e.g.
(v) {}instead of(p0) {}
- Callback autocomplete outputs e.g.
- Try-operator implementation rewritten from scratch.
- Forked from