pub trait VfsExtension:
Send
+ Sync
+ 'static {
type Request: Serialize + for<'de> Deserialize<'de> + Send + 'static;
type Response: Serialize + for<'de> Deserialize<'de> + Send + 'static;
const NAME: &'static str;
const VERSION: u16;
const AVAILABLE: bool = true;
// Required method
fn handle(
&self,
ctx: &mut ExtContext<'_>,
request: Self::Request,
) -> impl Future<Output = Self::Response> + Send;
}Expand description
A named, versioned VFS extension and its request handler.
Implement this trait for a zero-sized extension descriptor, then register
it with the vfs_extension! macro. The extension
must be linked into both the caller and the server for remote dispatch.
Required Associated Constants§
Provided Associated Constants§
Required Associated Types§
Sourcetype Request: Serialize + for<'de> Deserialize<'de> + Send + 'static
type Request: Serialize + for<'de> Deserialize<'de> + Send + 'static
Extension request payload.
Sourcetype Response: Serialize + for<'de> Deserialize<'de> + Send + 'static
type Response: Serialize + for<'de> Deserialize<'de> + Send + 'static
Extension response payload.
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".