pub struct MaterializedFile {
pub path: PathBuf,
pub module_root: PathBuf,
pub source: ResolvedSource,
pub manifest: Arc<Manifest>,
}Expand description
A symbolic import resolved to a concrete file on disk.
Fields§
§path: PathBufAbsolute path to the resolved file.
module_root: PathBufAbsolute path to the root directory of the module that owns the file.
source: ResolvedSourceThe source the file’s owning module came from.
manifest: Arc<Manifest>The parsed manifest of the dependency that owns this file.
Implementations§
Source§impl MaterializedFile
impl MaterializedFile
Sourcepub fn child_module(
&self,
consumer: &Module,
dep_name: DependencyName,
) -> Module
pub fn child_module( &self, consumer: &Module, dep_name: DependencyName, ) -> Module
Builds the Module that owns this file.
The owning module is a child of consumer reached through dep_name,
so its transitive imports resolve their own relative paths and
lockfile entries correctly. Callers consume this instead of
assembling a module from the file’s manifest and root themselves.
Trait Implementations§
Source§impl Clone for MaterializedFile
impl Clone for MaterializedFile
Source§fn clone(&self) -> MaterializedFile
fn clone(&self) -> MaterializedFile
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 MaterializedFile
impl Debug for MaterializedFile
impl Eq for MaterializedFile
Source§impl PartialEq for MaterializedFile
impl PartialEq for MaterializedFile
impl StructuralPartialEq for MaterializedFile
Auto Trait Implementations§
impl Freeze for MaterializedFile
impl RefUnwindSafe for MaterializedFile
impl Send for MaterializedFile
impl Sync for MaterializedFile
impl Unpin for MaterializedFile
impl UnsafeUnpin for MaterializedFile
impl UnwindSafe for MaterializedFile
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.