This crate provides the extension_fn macro for extending types with extension functions.
Example
For example there is a count_numbers extension function for str:
/// Replacement for:
/// Sealed is internal trait that used to provide only one implementation of trait and nobody outside module can implement this
/// pub trait CountNumbers: Sealed {
/// fn count_numbers(&self) -> u32;
/// }
/// impl CountNumbers for str {
/// fn count_numbers(&self) -> u32 { ... }
/// }
You can extend using async functions by adding async-trait to your dependencies:
[]
= "*"
Also you can extend types that matching trait bound: