Trait iota_metrics::metered_channel::WithPermit
source · pub trait WithPermit<T> {
// Required method
fn with_permit<'life0, 'async_trait, F>(
&'life0 self,
f: F,
) -> Pin<Box<dyn Future<Output = Option<(Permit<'_, T>, F::Output)>> + Send + 'async_trait>>
where F: 'async_trait + Future + Send,
Self: 'async_trait,
'life0: 'async_trait;
}
Expand description
Defines an asynchronous method with_permit
for working with a permit to
send a message.
Required Methods§
fn with_permit<'life0, 'async_trait, F>( &'life0 self, f: F, ) -> Pin<Box<dyn Future<Output = Option<(Permit<'_, T>, F::Output)>> + Send + 'async_trait>>
Object Safety§
This trait is not object safe.