Index: Cargo.toml ================================================================== --- Cargo.toml +++ Cargo.toml @@ -1,8 +1,8 @@ [package] name = "schmoozer" -version = "0.4.0" +version = "0.4.1" edition = "2021" license = "0BSD" # https://crates.io/category_slugs categories = [ "network-programming" ] keywords = [ "connector", "network", "tokio" ] Index: src/lib.rs ================================================================== --- src/lib.rs +++ src/lib.rs @@ -111,10 +111,21 @@ /// # Errors /// If a fatal error occurs that is not retryable the implementation returns /// [`RunResult::Exit`] with an `Err(E)`, which will be returned by the /// connector loop function. async fn run(&mut self, conn: Self::ConnType) -> RunResult; + + /// Optionally return a `String` representation of the connector's target + /// address. + /// + /// The returned `String` is intended for display/logging, and is not meant + /// to be reversible. + /// + /// The default implementation returns `None`. + fn display_target(&self) -> Option { + None + } } /// Special-purpose result returned by [`Connector::connect()`]. pub enum ConnResult { Index: www/changelog.md ================================================================== --- www/changelog.md +++ www/changelog.md @@ -2,18 +2,30 @@ ⚠️ indicates a breaking change. ## [Unreleased] -[Details](/vdiff?from=schmoozer-0.4.0&to=trunk) +[Details](/vdiff?from=schmoozer-0.4.1&to=trunk) ### Added ### Changed ### Removed +--- + +## [0.4.1] - 2024-10-18 + +[Details](/vdiff?from=schmoozer-0.4.0&to=schmoozer-0.4.1) + +### Added + +- New trait method `Connector::display_target()` can be used to return a + `String` representation of the Connector's target address. The default + implementation returns `None`. + --- ## [0.4.0] - 2024-10-03 [Details](/vdiff?from=schmoozer-0.3.0&to=schmoozer-0.4.0)