caio.co/de/foca

Update docs wrt std feature / core::error::Error

Id
2316d78b69eff4eaf2e7ff35d438ede3912ac4dd
Author
Caio
Commit time
2024-09-06T08:29:55+02:00

Modified CHANGELOG.md

@@ -1,5 +1,12
# Changelog

+## UNRELEASED
+
+- **BREAKING**: `foca::Error` now relies on `core::error::Error`
+ instead of `anyhow::Error` to wrap Codec and Broadcast errors. The
+ dependency has been removed
+- **BREAKING**: MSRV is now 1.81.0
+
## v0.17.2 - 2024-06-04

- Bugfix: foca could incorrectly attach custom broadcasts to

Modified README.md

@@ -75,9 +75,8

Every feature is optional. The `default` set will always be empty.

-* `std`: Adds `std::error::Error` support, implements `foca::Identity`
- for `std::net::SocketAddr*` and exposes `Config::new_lan` and
- `Config::new_wan`
+* `std`: Implements `foca::Identity` for `std::net::SocketAddr*` and
+ exposes `Config::new_lan` and `Config::new_wan`
* `tracing`: Instruments Foca using the [tracing][] crate. High-level
protocol interactions are emited as `DEBUG` traces, more details can
be exposed with the `TRACE` level. No other levels are emitted.

Modified src/error.rs

@@ -159,5 +159,4
}
}

-#[cfg(feature = "std")]
-impl std::error::Error for Error {}
+impl core::error::Error for Error {}

Modified src/lib.rs

@@ -6,8 +6,9
//! with its useful extensions (`SWIM+Inf.+Susp.`).
//!
//! * It's a `no_std` + `alloc` crate by default. There's an optional
-//! `std` feature that simply brings compatibility with some types
-//! and the `std::error::Error` trait
+//! `std` feature that simply adds compatibility with socket address
+//! types and exposes helpers to generate a configuration based on
+//! cluster size
//!
//! * Bring Your Own Everything: Foca doesn't care about anything that
//! isn't part of the cluster membership functionality: