cgp v0.3.1
Version 0.3.1 of cgp, the library for Context-Generic Programming (CGP) that enables pluggable trait implementations in Rust, adds two error traits that require an Async context and raises the minimum Rust version. This page lists every change a user can see and the steps that take a project there from v0.3.0.
Released on 2025-01-16.
- Crate:
cgp0.3.1 on crates.io - Changes: v0.3.0...v0.3.1
Summary
CanRaiseAsyncError and CanWrapAsyncError combine CanRaiseError and CanWrapError with HasAsyncErrorType, and the prelude exports both new traits and HasAsyncErrorType. The minimum Rust version rises to 1.84. The release removes and renames nothing.
Compatibility
- Minimum Rust version: 1.84, up from 1.83 (#58).
- Released together: only
cgp,cgp-core, andcgp-errorhave a 0.3.1 version. The workspace's other 18 crates stay at 0.3.0, and the three new versions depend on them.
Upgrading
A project on Rust 1.84 or newer takes one step: change the version to cgp = "0.3.1". Nothing else changes, because the release adds names without removing or renaming any.
New features
CanRaiseAsyncError<SourceError>andCanWrapAsyncError<SourceError>require anAsynccontext. Each is the matchingCanRaiseErrororCanWrapErrorbound together withHasAsyncErrorType, and each is implemented for every context that meets both bounds, so a bound on either needs no wiring.cgp-errorand the prelude export both (#60).
Improvements
- The prelude exports
HasAsyncErrorType, souse cgp::prelude::*;brings it in. It was already exported fromcgp-error, but not from the prelude (#59).
An AI agent wrote this page from the release's source changes and the CGP knowledge base. Its content was verified against the library's source at the release's tag. See How AI is used in this project.