pub struct CommitAmend { /* private fields */ }Expand description
Amend the most recent commit.
§Examples
use ironflow_ops_git::commit::CommitAmend;
use ironflow_core::operation::Operation;
let op = CommitAmend::new("/path/to/repo", "Updated message", "Alice", "alice@example.com");
assert_eq!(op.kind(), "git");Implementations§
Source§impl CommitAmend
impl CommitAmend
Sourcepub fn new(
repo_path: impl Into<PathBuf>,
message: impl Into<String>,
author_name: impl Into<String>,
author_email: impl Into<String>,
) -> Self
pub fn new( repo_path: impl Into<PathBuf>, message: impl Into<String>, author_name: impl Into<String>, author_email: impl Into<String>, ) -> Self
Create a new amend operation.
Sourcepub async fn run(
&self,
_ctx: &OperationContext,
) -> Result<CommitOutput, OperationError>
pub async fn run( &self, _ctx: &OperationContext, ) -> Result<CommitOutput, OperationError>
Execute and return a typed result.
Trait Implementations§
Source§impl Operation for CommitAmend
impl Operation for CommitAmend
Source§fn execute<'life0, 'life1, 'async_trait>(
&'life0 self,
ctx: &'life1 OperationContext,
) -> Pin<Box<dyn Future<Output = Result<Value, OperationError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn execute<'life0, 'life1, 'async_trait>(
&'life0 self,
ctx: &'life1 OperationContext,
) -> Pin<Box<dyn Future<Output = Result<Value, OperationError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Execute the operation and return the result as JSON. Read more
Source§impl TypedOperation for CommitAmend
impl TypedOperation for CommitAmend
Source§type Output = CommitOutput
type Output = CommitOutput
The concrete output type that
Operation::execute produces.Auto Trait Implementations§
impl Freeze for CommitAmend
impl RefUnwindSafe for CommitAmend
impl Send for CommitAmend
impl Sync for CommitAmend
impl Unpin for CommitAmend
impl UnsafeUnpin for CommitAmend
impl UnwindSafe for CommitAmend
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