Skip to main content

ProviderAdapter

Trait ProviderAdapter 

Source
pub trait ProviderAdapter {
    // Required methods
    fn id(&self) -> &'static str;
    fn version(&self) -> &'static str;
    fn provider(&self) -> &'static str;
    fn discover(&self) -> Vec<SourceLocation>;
    fn scan_candidates(
        &self,
        source: &SourceLocation,
    ) -> Result<Vec<ScanCandidateFile>>;
    fn scan(
        &self,
        source: &SourceLocation,
        options: &ScanOptions,
    ) -> Result<AdapterScan>;

    // Provided method
    fn probe_verified_source_state(
        &self,
        _source: &SourceLocation,
    ) -> Result<Option<VerifiedSourceState>> { ... }
}

Required Methods§

Source

fn id(&self) -> &'static str

Source

fn version(&self) -> &'static str

Source

fn provider(&self) -> &'static str

Source

fn discover(&self) -> Vec<SourceLocation>

Source

fn scan_candidates( &self, source: &SourceLocation, ) -> Result<Vec<ScanCandidateFile>>

Source

fn scan( &self, source: &SourceLocation, options: &ScanOptions, ) -> Result<AdapterScan>

Provided Methods§

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§