Skip to main content

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.

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, and cgp-error have 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> and CanWrapAsyncError<SourceError> require an Async context. Each is the matching CanRaiseError or CanWrapError bound together with HasAsyncErrorType, and each is implemented for every context that meets both bounds, so a bound on either needs no wiring. cgp-error and the prelude export both (#60).

Improvements​

  • The prelude exports HasAsyncErrorType, so use cgp::prelude::*; brings it in. It was already exported from cgp-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.