pub struct Files {
pub file_names: Vec<String>,
pub file_texts: Vec<String>,
pub file_line_maps: Vec<LineMap>,
}
Fields§
§file_names: Vec<String>
Arena of filenames from the input source.
Indexed via Pos::file
.
file_texts: Vec<String>
Arena of file source texts.
Indexed via Pos::file
.
file_line_maps: Vec<LineMap>
Arena of file line maps.
Indexed via Pos::file
.
Implementations§
Source§impl Files
impl Files
pub fn from_paths<P: AsRef<Path>>( paths: impl IntoIterator<Item = P>, ) -> Result<Self, (PathBuf, Error)>
pub fn from_names_and_contents( files: impl IntoIterator<Item = (String, String)>, ) -> Self
pub fn file_name(&self, file: usize) -> Option<&str>
pub fn file_text(&self, file: usize) -> Option<&str>
pub fn file_line_map(&self, file: usize) -> Option<&LineMap>
Trait Implementations§
impl Eq for Files
impl StructuralPartialEq for Files
Auto Trait Implementations§
impl Freeze for Files
impl RefUnwindSafe for Files
impl Send for Files
impl Sync for Files
impl Unpin for Files
impl UnwindSafe for Files
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