pub struct LeanWorkerImportPlanner { /* private fields */ }Expand description
Planner for worker-pool import/session batches.
Implementations§
Source§impl LeanWorkerImportPlanner
impl LeanWorkerImportPlanner
Sourcepub fn new(config: LeanWorkerImportPlanConfig) -> Self
pub fn new(config: LeanWorkerImportPlanConfig) -> Self
Create a planner from capability/session requirements.
Sourcepub fn plan_lake_project(
&self,
) -> Result<Vec<LeanWorkerPlannedBatch>, LeanWorkerImportPlanError>
pub fn plan_lake_project( &self, ) -> Result<Vec<LeanWorkerPlannedBatch>, LeanWorkerImportPlanError>
Discover a Lake project and return stable worker batches.
§Errors
Returns typed planning diagnostics for missing Lake roots, selected module roots, invalid module names, unsupported toolchains, or an unresolved capability target.
Sourcepub fn plan_discovered(
&self,
discovered: &LeanLakeProjectModules,
) -> Result<Vec<LeanWorkerPlannedBatch>, LeanWorkerImportPlanError>
pub fn plan_discovered( &self, discovered: &LeanLakeProjectModules, ) -> Result<Vec<LeanWorkerPlannedBatch>, LeanWorkerImportPlanError>
Plan batches from already discovered module descriptors.
§Errors
Returns a typed error if a supplied module descriptor has an invalid module name.
Sourcepub fn plan_work_items(
&self,
modules: impl IntoIterator<Item = LeanWorkerModuleWork>,
source_set: &LeanModuleSetFingerprint,
) -> Result<Vec<LeanWorkerPlannedBatch>, LeanWorkerImportPlanError>
pub fn plan_work_items( &self, modules: impl IntoIterator<Item = LeanWorkerModuleWork>, source_set: &LeanModuleSetFingerprint, ) -> Result<Vec<LeanWorkerPlannedBatch>, LeanWorkerImportPlanError>
Plan batches from caller-provided module work items.
§Errors
Returns a typed error if a supplied work item has an invalid module name.
Trait Implementations§
Source§impl Clone for LeanWorkerImportPlanner
impl Clone for LeanWorkerImportPlanner
Source§fn clone(&self) -> LeanWorkerImportPlanner
fn clone(&self) -> LeanWorkerImportPlanner
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 LeanWorkerImportPlanner
impl Debug for LeanWorkerImportPlanner
Source§impl PartialEq for LeanWorkerImportPlanner
impl PartialEq for LeanWorkerImportPlanner
Source§fn eq(&self, other: &LeanWorkerImportPlanner) -> bool
fn eq(&self, other: &LeanWorkerImportPlanner) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for LeanWorkerImportPlanner
impl StructuralPartialEq for LeanWorkerImportPlanner
Auto Trait Implementations§
impl Freeze for LeanWorkerImportPlanner
impl RefUnwindSafe for LeanWorkerImportPlanner
impl Send for LeanWorkerImportPlanner
impl Sync for LeanWorkerImportPlanner
impl Unpin for LeanWorkerImportPlanner
impl UnsafeUnpin for LeanWorkerImportPlanner
impl UnwindSafe for LeanWorkerImportPlanner
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