Trait ItemCost
pub trait ItemCost<I> {
// Required method
fn cost_of(&self, item: &I) -> u64;
}Available on crate feature
std only.Expand description
Prices the items sent through a PacedSink.
The default coster () uses the item’s own DatagramCost;
CostFn uses a closure instead.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".