pub struct ModuleFile<'a> {
pub path: &'a Path,
pub language: Language,
pub tokens: &'a [Token],
}Expand description
One file, as module resolution needs to see it.
Fields§
§path: &'a PathPath the file was discovered at. Only its shape matters — the directory it sits in and its stem — so any consistent root will do, provided every file in the set shares it.
language: LanguageLanguage the file was parsed as. Anything but Rust is passed over.
tokens: &'a [Token]The file’s tokens, comments and whitespace already removed.
Trait Implementations§
Source§impl<'a> Clone for ModuleFile<'a>
impl<'a> Clone for ModuleFile<'a>
Source§fn clone(&self) -> ModuleFile<'a>
fn clone(&self) -> ModuleFile<'a>
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 moreimpl<'a> Copy for ModuleFile<'a>
Auto Trait Implementations§
impl<'a> Freeze for ModuleFile<'a>
impl<'a> RefUnwindSafe for ModuleFile<'a>
impl<'a> Send for ModuleFile<'a>
impl<'a> Sync for ModuleFile<'a>
impl<'a> Unpin for ModuleFile<'a>
impl<'a> UnsafeUnpin for ModuleFile<'a>
impl<'a> UnwindSafe for ModuleFile<'a>
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