pub trait RequestWeight {
// Provided method
fn request_weight(&self) -> usize { ... }
}Expand description
A trait for reading the weight of a request to BatchControl services.
Provided Methods§
Sourcefn request_weight(&self) -> usize
fn request_weight(&self) -> usize
Returns the weight of a request relative to the maximum threshold for flushing requests to the underlying service.
Batch bookkeeping treats every queued item as having a weight of at least 1, so zero-weight items still start the batch timer and are flushed.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".