pub trait FileWriter: Send + Sync {
// Required methods
fn is_closed(&self) -> bool;
fn write<'life0, 'life1, 'async_trait>(
&'life0 mut self,
effect_id: &'life1 EffectId,
work: Option<Arc<WorkBudget>>,
bytes: Vec<u8>,
) -> Pin<Box<dyn Future<Output = Result<(), FilesystemError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn close<'life0, 'life1, 'async_trait>(
&'life0 mut self,
effect_id: &'life1 EffectId,
work: Option<Arc<WorkBudget>>,
) -> Pin<Box<dyn Future<Output = Result<(), FilesystemError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
// Provided method
fn descriptor(&self) -> Option<ResourceDescriptor> { ... }
}Required Methods§
fn is_closed(&self) -> bool
fn write<'life0, 'life1, 'async_trait>(
&'life0 mut self,
effect_id: &'life1 EffectId,
work: Option<Arc<WorkBudget>>,
bytes: Vec<u8>,
) -> Pin<Box<dyn Future<Output = Result<(), FilesystemError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Sourcefn close<'life0, 'life1, 'async_trait>(
&'life0 mut self,
effect_id: &'life1 EffectId,
work: Option<Arc<WorkBudget>>,
) -> Pin<Box<dyn Future<Output = Result<(), FilesystemError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn close<'life0, 'life1, 'async_trait>(
&'life0 mut self,
effect_id: &'life1 EffectId,
work: Option<Arc<WorkBudget>>,
) -> Pin<Box<dyn Future<Output = Result<(), FilesystemError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Only explicit close publishes. Dropping a writer never publishes it.
Provided Methods§
fn descriptor(&self) -> Option<ResourceDescriptor>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".