pub trait WriteGuard: Send + Sync {
// Required method
fn before_write<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), SourceError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
Renews the engine’s hold on the creates a guarded call writes for, before each request.
Required Methods§
Sourcefn before_write<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), SourceError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn before_write<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), SourceError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Renew, and answer whether the next write request may be sent: an error is the reason it may not — another attempt holds the create — and every later ask answers it again, so a source sends nothing more, not even a write taking back what it made.
§Errors
The refusal the source is to fail its call with, sending nothing more.
Implementations§
Source§impl dyn WriteGuard
impl dyn WriteGuard
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".