pub struct SourceReader { /* private fields */ }Implementations§
Source§impl SourceReader
impl SourceReader
pub fn new() -> Self
pub fn with_layout(layout: ProjectLayout) -> Self
Sourcepub fn read_one(
&self,
path: &Path,
source: &str,
) -> Result<(Option<ModuleData>, Vec<ReadWarning>), ReadError>
pub fn read_one( &self, path: &Path, source: &str, ) -> Result<(Option<ModuleData>, Vec<ReadWarning>), ReadError>
Read a single source. Locations are tagged with PathId::new(0);
for multi-file reads use read_tree, which threads a real
PathInterner so each file gets a distinct id.
pub fn read_tree<I>(&self, files: I) -> Result<ReadOutput, ReadError>
Trait Implementations§
Source§impl Clone for SourceReader
impl Clone for SourceReader
Source§fn clone(&self) -> SourceReader
fn clone(&self) -> SourceReader
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SourceReader
impl Debug for SourceReader
Source§impl Default for SourceReader
impl Default for SourceReader
Source§fn default() -> SourceReader
fn default() -> SourceReader
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for SourceReader
impl RefUnwindSafe for SourceReader
impl Send for SourceReader
impl Sync for SourceReader
impl Unpin for SourceReader
impl UnsafeUnpin for SourceReader
impl UnwindSafe for SourceReader
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more