pub trait Source {
type Error: Display;
// Required methods
fn kind(
&mut self,
path: &PackagePath,
) -> Result<Option<FileKind>, Self::Error>;
fn confined(&mut self, path: &PackagePath) -> Result<bool, Self::Error>;
fn read(&mut self, path: &PackagePath) -> Result<Vec<u8>, Self::Error>;
fn list(&mut self, path: &PackagePath) -> Result<Vec<DirEntry>, Self::Error>;
}Expand description
A synchronous supplier of plugin package bytes.
Required Associated Types§
Sourcetype Error: Display
type Error: Display
The source’s own failure type. Failures are folded into the loading
conversation as Answer::Unavailable, where the spec’s failure
boundaries decide how far the damage spreads.
Required Methods§
Sourcefn kind(&mut self, path: &PackagePath) -> Result<Option<FileKind>, Self::Error>
fn kind(&mut self, path: &PackagePath) -> Result<Option<FileKind>, Self::Error>
What kind of entry does path resolve to? None if absent.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".