predicates
An implementation of boolean-valued predicate functions.
3.1.4
213M downloads/mo
#478 most downloaded on crates.io
assert-rs/predicates-rs
What this package is like to depend on
Last release 6 months ago
11 Feb 2026
Release timing varies
gaps range from 8 days to 1.1 years
Most releases are documented
notes for 29 of 37 stable releases
Nothing withdrawn
no release was ever pulled
9 years old
37 releases · first in 2017
1 release in the last 12 months
see the full history below
Release timeline
37 releases · Jun 2017 to Feb 2026Releases
latest 37-
3.1.411 Feb 2026 -
3.1.319 Dec 2024Release notes
Open source →Features
- The
boxedfunction is now available for predicates with anItemtype that is notSized.
- The
-
3.1.225 Jul 2024 -
3.1.015 Jan 2024 -
3.0.418 Sep 2023 -
3.0.313 Apr 2023 -
3.0.224 Mar 2023Release notes
Open source →Fixes
- Respect
follow_linkswhen checking whether a path is backed by a file
- Respect
-
3.0.115 Mar 2023 -
3.0.015 Mar 2023Release notes
Open source →Compatibility
colorfeature no longer conditionally applies color. Instead color will be applied when formatting as{:#}color-autofeature was removed- Update MSRV to 1.64.0
-
2.1.529 Dec 2022 -
2.1.402 Dec 2022Nothing published for this version
-
2.1.313 Nov 2022Nothing published for this version
-
2.1.205 Nov 2022Release notes
Open source →Compatibility
Update MSRV to 1.60
Fixes
- Hide internal-only optional dependencies
-
2.1.111 Jan 2022Nothing published for this version
-
2.1.022 Nov 2021Release notes
Open source →Fixed
- Report user's value (the actual)
- Having the caller own this means you won't get intermediates like file paths
- We already show it for the
diffpredicate - Now we show it in each leaf predicate (like Eq) and when adapting it (like taking a path and loading its file)
- Remove redundant result with
eq_fileassertions - Clarify that the constant in Eq and Ord predicates is the expected value
- Report user's value (the actual)
-
2.0.307 Oct 2021Nothing published for this version
-
2.0.216 Aug 2021 -
2.0.126 Jul 2021 -
2.0.003 Jul 2021Release notes
Open source →Breaking Changes
predicates::str::diffwas removedpredicates::str::similarwas renamed todiff- The
differencefeature flag was renamed todiff diff().splitanddiff().distancewere removed
Fixes
- Shrink the output of Diffs because its redundant
- Moved off of an unmaintained Diff library
-
1.0.828 Apr 2021Nothing published for this version
-
1.0.730 Jan 2021Nothing published for this version
-
1.0.629 Dec 2020 -
1.0.518 Jul 2020 -
1.0.404 Mar 2020 -
1.0.325 Feb 2020Nothing published for this version
-
1.0.218 Nov 2019Release notes
Open source →Fixed
BooleanPredicatenow implementsPredicate<T>whereT: ?Sized(#84)
-
1.0.122 Apr 2019Release notes
Open source →Changed
- BooleanPredicate is no longer generic, and is always Send and Sync.
-
1.0.006 Oct 2018Nothing published for this version
-
0.9.106 Oct 2018 -
0.9.030 Jul 2018Release notes
Open source →Added
- Support
?Sizedtypes forFnPredicate. - Add
str_pred.normalize()predicate. - Add reflection to
Predicate. - Add support for predicates returning why they failed (
find_case) which can be combined with the newpredicates-treecrate. - Split out
predicates-corefor reducing ecosystem breaking changes.
Changed
- Predicates must also implement
PredicateReflection
- Support
-
0.5.220 Jul 2018 -
0.5.106 Jun 2018 -
0.5.030 May 2018Release notes
Open source →Added
- trait:
- Allow naming
Predicateexpressions
- Allow naming
- str:
- Add regex repetition count, closes #27
- from_utf8 adapter, closes #21
- Trimming predicate decorator
- path:
eq_filepredicate to test a file-under-test with a fixture, closes #32.eq_file(...).utf()adapter to do string comparisons with the fixture
- Add a
from_file_pathextension method toPredicate<[u8]>that turns it into aPredicate<Path>, closes #31.
Breaking Changes
- trait:
-
0.4.010 May 2018Release notes
Open source →Added
- Define oldest supported version of Rust as 1.22.
- CI that ensures
- works on Windows and Linux
- works on 1.22 to nightly
- float:
is_closePredicate (see #11). - path:
- File type predicates:
is_file,is_dir,is_symlink(see #8). - Existence predicate:
exists,missing(see #8).
- File type predicates:
- str:
- Basic string predicates:
is_empty,starts_with,ends_with, andcontainswith optional count (see #25). - Regex predicate (see #12).
- Edit-distance predicate (see #9).
- Basic string predicates:
Changed
- Clearly delineate API from prelude (see #17).
- Switch
Predicatetrait from Associated Types to Generics. - iter:
- Renamed
setpredicates asiterpredicates to clarify the intent from some implementation. - Remove ambiguity of predicate factories (see #24):
contains->in_itercontains_hashable->in_hash- Turned
contains_ordinto a specialization ofin_iterby adding asortmethod.
- Renamed
-
0.3.026 Jun 2017Release notes
Open source →Added
BoxPredicatetype that wraps aPredicatetrait object to make it easier to store and work with predicates through a program. Also implementsDebugandDisplaywrappers as a convenience.FnPredicatetype that wraps a function of the typeFn(&T) -> boolin aPredicatetype.
Changed
- The
boxedfunction now returns a typeBoxPredicateinstead of a type alias. - The
Itemtype parameter ofPredicateno longer has theSizedrestriction.
-
0.2.002 Jun 2017Release notes
Open source →Added
- This changelog
Fixed
- Made modules under
predicateprivate, with their public interfaces exposed throughpub usein thepredicatemod.rsfile.
-
0.1.002 Jun 2017Release notes
Open source →Added
- Initial commit of functional code
- Continuous integration with Travis (Linux) and AppVeyor (Windows)
- Basic README
<!-- next-url --> [Unreleased]: https://github.com/assert-rs/predicates-rs/compare/v3.1.4...HEAD [3.1.4]: https://github.com/assert-rs/predicates-rs/compare/v3.1.3...v3.1.4 [3.1.3]: https://github.com/assert-rs/predicates-rs/compare/v3.1.2...v3.1.3 [3.1.2]: https://github.com/assert-rs/predicates-rs/compare/v3.1.1...v3.1.2 [3.1.1]: https://github.com/assert-rs/predicates-rs/compare/v3.1.0...v3.1.1 [3.1.0]: https://github.com/assert-rs/predicates-rs/compare/v3.0.4...v3.1.0 [3.0.4]: https://github.com/assert-rs/predicates-rs/compare/v3.0.3...v3.0.4 [3.0.3]: https://github.com/assert-rs/predicates-rs/compare/v3.0.2...v3.0.3 [3.0.2]: https://github.com/assert-rs/predicates-rs/compare/v3.0.1...v3.0.2 [3.0.1]: https://github.com/assert-rs/predicates-rs/compare/v3.0.0...v3.0.1 [3.0.0]: https://github.com/assert-rs/predicates-rs/compare/v2.1.5...v3.0.0 [2.1.5]: https://github.com/assert-rs/predicates-rs/compare/v2.1.4...v2.1.5 [2.1.4]: https://github.com/assert-rs/predicates-rs/compare/v2.1.3...v2.1.4 [2.1.3]: https://github.com/assert-rs/predicates-rs/compare/v2.1.2...v2.1.3 [2.1.2]: https://github.com/assert-rs/predicates-rs/compare/v2.1.1...v2.1.2 [2.1.1]: https://github.com/assert-rs/predicates-rs/compare/v2.1.0...v2.1.1 [2.1.0]: https://github.com/assert-rs/predicates-rs/compare/v2.0.3...v2.1.0 [2.0.3]: https://github.com/assert-rs/predicates-rs/compare/v2.0.2...v2.0.3 [2.0.2]: https://github.com/assert-rs/predicates-rs/compare/v2.0.1...v2.0.2 [2.0.1]: https://github.com/assert-rs/predicates-rs/compare/v2.0.0...v2.0.1 [2.0.0]: https://github.com/assert-rs/predicates-rs/compare/v1.0.8...v2.0.0 [1.0.8]: https://github.com/assert-rs/predicates-rs/compare/v1.0.7...v1.0.8 [1.0.7]: https://github.com/assert-rs/predicates-rs/compare/v1.0.6...v1.0.7 [1.0.6]: https://github.com/assert-rs/predicates-rs/compare/v1.0.5...v1.0.6 [1.0.5]: https://github.com/assert-rs/predicates-rs/compare/v1.0.4...v1.0.5 [1.0.4]: https://github.com/assert-rs/predicates-rs/compare/v1.0.3...v1.0.4 [1.0.3]: https://github.com/assert-rs/predicates-rs/compare/v1.0.2...v1.0.3 [1.0.2]: https://github.com/assert-rs/predicates-rs/compare/v1.0.1...v1.0.2 [1.0.1]: https://github.com/assert-rs/predicates-rs/compare/v1.0.0...v1.0.1 [1.0.0]: https://github.com/assert-rs/predicates-rs/compare/v0.9.1...v1.0.0 [0.9.1]: https://github.com/assert-rs/predicates-rs/compare/v0.9.0...v0.9.1 [0.9.0]: https://github.com/assert-rs/predicates-rs/compare/v0.5.2...v0.9.0 [0.5.2]: https://github.com/assert-rs/predicates-rs/compare/v0.5.1...v0.5.2 [0.5.1]: https://github.com/assert-rs/predicates-rs/compare/v0.5.0...v0.5.1 [0.5.0]: https://github.com/assert-rs/predicates-rs/compare/v0.4.0...v0.5.0 [0.4.0]: https://github.com/assert-rs/predicates-rs/compare/v0.3.0...v0.4.0 [0.3.0]: https://github.com/assert-rs/predicates-rs/compare/v0.2.0...v0.3.0 [0.2.0]: https://github.com/assert-rs/predicates-rs/compare/v0.1.0...v0.2.0