Skip to content

Commit 0392d43

Browse files
committed
error: add note about introspection
1 parent 523b55b commit 0392d43

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ Enhancements:
99
* [#412](https://github.com/BurntSushi/jiff/issues/412):
1010
Add `Display`, `FromStr`, `Serialize` and `Deserialize` trait implementations
1111
for `jiff::civil::ISOWeekDate`. These all use the ISO 8601 week date format.
12+
* [#418](https://github.com/BurntSushi/jiff/issues/418):
13+
Add some basic predicates to `jiff::Error` for basic error introspection.
1214

1315

1416
0.2.16 (2025-11-07)

src/error/mod.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,11 @@ pub(crate) mod zoned;
2727
///
2828
/// Other than implementing the [`std::error::Error`] trait when the
2929
/// `std` feature is enabled, the [`core::fmt::Debug`] trait and the
30-
/// [`core::fmt::Display`] trait, this error type currently provides no
31-
/// introspection capabilities.
30+
/// [`core::fmt::Display`] trait, this error type currently provides
31+
/// very limited introspection capabilities. Simple predicates like
32+
/// `Error::is_range` are provided, but the predicates are not
33+
/// exhaustive. That is, there exist some errors that do not return
34+
/// `true` for any of the `Error::is_*` predicates.
3235
///
3336
/// # Design
3437
///

0 commit comments

Comments
 (0)