Skip to main content

InputPlugin

Trait InputPlugin 

Source
pub trait InputPlugin: Send + Sync {
    // Required methods
    fn id(&self) -> &str;
    fn format(&self) -> &str;
    fn load(&self, path: &Path) -> Result<InputContract>;

    // Provided method
    fn load_with_options(
        &self,
        path: &Path,
        options: &InputOptions,
    ) -> Result<InputContract> { ... }
}

Required Methods§

Source

fn id(&self) -> &str

Unique provider identity, e.g. graphql.apollo or openapi.roas.

Source

fn format(&self) -> &str

Protocol/description format this plugin reads.

Source

fn load(&self, path: &Path) -> Result<InputContract>

Provided Methods§

Source

fn load_with_options( &self, path: &Path, options: &InputOptions, ) -> Result<InputContract>

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§