pub trait SourceFile {
// Required methods
fn get_id(&self) -> Source;
fn get_path(&self) -> RcStr;
fn get_content(&self) -> Rc<dyn SourceContent>;
// Provided method
fn extract(&self, begin: usize, end: usize) -> String { ... }
}Required Methods§
fn get_id(&self) -> Source
fn get_path(&self) -> RcStr
Sourcefn get_content(&self) -> Rc<dyn SourceContent>
fn get_content(&self) -> Rc<dyn SourceContent>
Obtain the content of this source file. The returned object may be used to iterate over the characters in the file or extract portions of it.
Provided Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".