pub struct InitOperation<P, M = (), I = ()> { /* private fields */ }Implementations§
Source§impl<P> InitOperation<P, (), ()>where
P: ProjectProvider,
impl<P> InitOperation<P, (), ()>where
P: ProjectProvider,
pub fn new(project_provider: P) -> Self
Sourcepub fn prepare_simple(&self, start_path: &Path) -> Result<InitPlan>
pub fn prepare_simple(&self, start_path: &Path) -> Result<InitPlan>
§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>
§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>
§Errors
Returns an error if the project cannot be discovered or the changeset directory cannot be created.
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>
§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>
§Errors
Returns an error if the changeset directory cannot be created or configuration cannot be written.
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
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
Converts
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>
Converts
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