pub struct BuildPlan { /* private fields */ }
Expand description
Represents the full build plan for a project.
Implementations
sourceimpl BuildPlan
impl BuildPlan
sourcepub fn new(
manifest: &ManifestFile,
sway_git_tag: &str,
offline: bool
) -> Result<Self>
pub fn new(
manifest: &ManifestFile,
sway_git_tag: &str,
offline: bool
) -> Result<Self>
Create a new build plan for the project by fetching and pinning dependenies.
sourcepub fn apply_pkg_diff(
&self,
pkg_diff: PkgDiff,
sway_git_tag: &str,
offline_mode: bool
) -> Result<Self>
pub fn apply_pkg_diff(
&self,
pkg_diff: PkgDiff,
sway_git_tag: &str,
offline_mode: bool
) -> Result<Self>
Create a new build plan from an existing one. Needs the difference with the existing plan with the lock.
sourcepub fn from_lock(
proj_path: &Path,
lock: &Lock,
sway_git_tag: &str
) -> Result<Self>
pub fn from_lock(
proj_path: &Path,
lock: &Lock,
sway_git_tag: &str
) -> Result<Self>
Attempt to load the build plan from the Lock
.
sourcepub fn from_lock_file(lock_path: &Path, sway_git_tag: &str) -> Result<Self>
pub fn from_lock_file(lock_path: &Path, sway_git_tag: &str) -> Result<Self>
Attempt to load the build plan from the Forc.lock
file.
sourcepub fn validate(
&self,
manifest: &Manifest,
sway_git_tag: &str
) -> Result<PkgDiff>
pub fn validate(
&self,
manifest: &Manifest,
sway_git_tag: &str
) -> Result<PkgDiff>
Ensure that the build plan is valid for the given manifest.
sourcepub fn path_map(&self) -> &PathMap
pub fn path_map(&self) -> &PathMap
View the build plan’s map of pinned package IDs to the path containing a local copy of their source.
sourcepub fn compilation_order(&self) -> &[NodeIx]
pub fn compilation_order(&self) -> &[NodeIx]
The order in which nodes are compiled, determined via a toposort of the package graph.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for BuildPlan
impl Send for BuildPlan
impl Sync for BuildPlan
impl Unpin for BuildPlan
impl UnwindSafe for BuildPlan
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more