pub trait AddNewCrateToWorkspace<P, H>where
P: for<'async_trait> Debug + for<'async_trait> Clone + for<'async_trait> From<PathBuf> + for<'async_trait> AsRef<Path> + for<'async_trait> Send + for<'async_trait> Sync + 'async_trait,
H: CrateHandleInterface<P> + Debug + Send + Sync,{
type Error;
// Required method
fn add_new_crate_to_workspace<'life0, 'life1, 'async_trait>(
&'life0 mut self,
new_crate_name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<H, Self::Error>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait;
}Expand description
The main trait: Add a brand-new crate to the workspace with minimal scaffolding.
- Creates the directory & minimal Cargo.toml with placeholders for description, keywords, categories
- If the new crate name starts with an existing prefix group (e.g. “batch-mode-”),
we also register it in that facade and optionally add a dependency on
<prefix>-3p. - If no prefix group is found, the crate is stand-alone, but the user can unify it later.
Required Associated Types§
Required Methods§
Sourcefn add_new_crate_to_workspace<'life0, 'life1, 'async_trait>(
&'life0 mut self,
new_crate_name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<H, Self::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn add_new_crate_to_workspace<'life0, 'life1, 'async_trait>(
&'life0 mut self,
new_crate_name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<H, Self::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Creates the new crate on disk, appends it to the workspace membership, tries to detect a prefix group, and if found, registers it in that group.