pub trait BytePermits: Send + Sync {
// Required method
fn acquire<'life0, 'async_trait>(
&'life0 self,
n_bytes: usize,
) -> Pin<Box<dyn Future<Output = Permit> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
Backpressure permit trait.
Implementations control write pump flow based on byte counts.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".