Skip to main content

SourceProvider

Trait SourceProvider 

Source
pub trait SourceProvider: Send + Sync {
    // Required method
    fn read(&self, path: &str) -> Option<Arc<str>>;
}
Expand description

Read a file’s source text on demand. Returns None if the path is unreadable or doesn’t exist — the analyzer treats that as “this class is unresolvable” and (negative-)caches the failure.

Required Methods§

Source

fn read(&self, path: &str) -> Option<Arc<str>>

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§