Skip to main content

FieldSetter

Trait FieldSetter 

Source
pub trait FieldSetter: Send + Sync {
    // Required method
    fn set<'life0, 'async_trait>(
        &'life0 self,
        data: Vec<u8>,
    ) -> Pin<Box<dyn Future<Output = Result<(), MountError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

A field file’s write side: either NoSetter (read-only) or a real Fn(Vec<u8>) -> DevFuture<'static, Result<(), MountError>> closure. Sealed-by-convention — implemented here and via the blanket impl below; not meant to be implemented by downstream crates.

Required Methods§

Source

fn set<'life0, 'async_trait>( &'life0 self, data: Vec<u8>, ) -> Pin<Box<dyn Future<Output = Result<(), MountError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Apply a write, or reject it (read-only field).

Implementors§

Source§

impl FieldSetter for NoSetter

Source§

impl<S> FieldSetter for S
where S: Fn(Vec<u8>) -> DevFuture<'static, Result<(), MountError>> + Send + Sync,