pub struct ProgramLoader { /* private fields */ }Expand description
Loads one entrypoint and its complete local module graph.
Implementations§
Source§impl ProgramLoader
impl ProgramLoader
Sourcepub fn new(
root: &ProjectRoot,
options: &CompilerOptions,
) -> Result<Self, ProgramLoadError>
pub fn new( root: &ProjectRoot, options: &CompilerOptions, ) -> Result<Self, ProgramLoadError>
Creates a loader using the project’s already-validated compiler options.
Sourcepub fn load(
&self,
entrypoint: impl AsRef<Path>,
) -> Result<ResolvedProgram, ProgramLoadError>
pub fn load( &self, entrypoint: impl AsRef<Path>, ) -> Result<ResolvedProgram, ProgramLoadError>
Resolves and loads an entrypoint. The entrypoint may be root-relative or absolute.
Trait Implementations§
Source§impl Clone for ProgramLoader
impl Clone for ProgramLoader
Source§fn clone(&self) -> ProgramLoader
fn clone(&self) -> ProgramLoader
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 moreAuto Trait Implementations§
impl Freeze for ProgramLoader
impl RefUnwindSafe for ProgramLoader
impl Send for ProgramLoader
impl Sync for ProgramLoader
impl Unpin for ProgramLoader
impl UnsafeUnpin for ProgramLoader
impl UnwindSafe for ProgramLoader
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