pub trait SourceOpener: Send + Sync {
// Required methods
fn reads(&self, path: &Path) -> bool;
fn sources(&self, path: &Path) -> DspResult<Vec<SourceEntry>>;
fn open(&self, path: &Path, id: &str) -> DspResult<Box<dyn RecordingSource>>;
// Provided method
fn layout(&self, _path: &Path, _id: &str) -> Option<ChannelLayout> { ... }
}Expand description
Opens the files of a domain’s formats.
Required Methods§
Sourcefn reads(&self, path: &Path) -> bool
fn reads(&self, path: &Path) -> bool
Whether path is one of its formats (cheap: the name or a header).
fn sources(&self, path: &Path) -> DspResult<Vec<SourceEntry>>
fn open(&self, path: &Path, id: &str) -> DspResult<Box<dyn RecordingSource>>
Provided Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".