pub struct InitOperation<P, M = (), I = ()> { /* private fields */ }Implementations§
Source§impl<P> InitOperation<P, (), ()>where
P: ProjectProvider,
impl<P> InitOperation<P, (), ()>where
P: ProjectProvider,
Source§impl<P, M, I> InitOperation<P, M, I>where
P: ProjectProvider,
impl<P, M, I> InitOperation<P, M, I>where
P: ProjectProvider,
pub fn with_manifest_writer<M2>(self, writer: M2) -> InitOperation<P, M2, I>
pub fn with_interaction_provider<I2>( self, provider: I2, ) -> InitOperation<P, M, I2>
Source§impl<P, M, I> InitOperation<P, M, I>
impl<P, M, I> InitOperation<P, M, I>
Sourcepub fn prepare(&self, start_path: &Path, input: &InitInput) -> Result<InitPlan>
pub fn prepare(&self, start_path: &Path, input: &InitInput) -> Result<InitPlan>
Prepares an initialization plan by collecting all configuration without performing any file system operations.
§Errors
Returns an error if the project cannot be discovered or configuration cannot be built (e.g., interactive prompts fail).
Sourcepub fn execute_plan(
&self,
start_path: &Path,
plan: &InitPlan,
) -> Result<InitOutput>
pub fn execute_plan( &self, start_path: &Path, plan: &InitPlan, ) -> Result<InitOutput>
Executes the init operation using a pre-built plan.
§Errors
Returns an error if the changeset directory cannot be created or configuration cannot be written.
Source§impl<P> InitOperation<P, (), ()>where
P: ProjectProvider,
impl<P> InitOperation<P, (), ()>where
P: ProjectProvider,
Sourcepub fn prepare_simple(&self, start_path: &Path) -> Result<InitPlan>
pub fn prepare_simple(&self, start_path: &Path) -> Result<InitPlan>
Prepares a simple initialization plan without configuration.
§Errors
Returns an error if the project cannot be discovered.
Sourcepub fn execute_simple_plan(
&self,
start_path: &Path,
plan: &InitPlan,
) -> Result<InitOutput>
pub fn execute_simple_plan( &self, start_path: &Path, plan: &InitPlan, ) -> Result<InitOutput>
Executes the simple init operation using a pre-built plan.
§Errors
Returns an error if the changeset directory cannot be created.
Sourcepub fn execute_simple(&self, start_path: &Path) -> Result<InitOutput>
pub fn execute_simple(&self, start_path: &Path) -> Result<InitOutput>
Simple execute method for backward compatibility when no manifest writer or interaction provider is configured.
§Errors
Returns an error if the project cannot be discovered or the changeset directory cannot be created.
Auto Trait Implementations§
impl<P, M, I> Freeze for InitOperation<P, M, I>
impl<P, M, I> RefUnwindSafe for InitOperation<P, M, I>
impl<P, M, I> Send for InitOperation<P, M, I>
impl<P, M, I> Sync for InitOperation<P, M, I>
impl<P, M, I> Unpin for InitOperation<P, M, I>
impl<P, M, I> UnsafeUnpin for InitOperation<P, M, I>
impl<P, M, I> UnwindSafe for InitOperation<P, M, I>
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more