pub struct RefDelete { /* private fields */ }Expand description
Delete a reference.
§Examples
use ironflow_ops_git::refs::RefDelete;
use ironflow_core::operation::Operation;
let op = RefDelete::new("/path/to/repo", "refs/heads/old-branch");
assert_eq!(op.kind(), "git");Implementations§
Source§impl RefDelete
impl RefDelete
Sourcepub fn new(repo_path: impl Into<PathBuf>, name: impl Into<String>) -> Self
pub fn new(repo_path: impl Into<PathBuf>, name: impl Into<String>) -> Self
Create a new reference-delete operation.
Sourcepub async fn run(
&self,
_ctx: &OperationContext,
) -> Result<RefDeleteOutput, OperationError>
pub async fn run( &self, _ctx: &OperationContext, ) -> Result<RefDeleteOutput, OperationError>
Execute and return a typed result.
Trait Implementations§
Source§impl Operation for RefDelete
impl Operation for RefDelete
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 RefDelete
impl TypedOperation for RefDelete
Source§type Output = RefDeleteOutput
type Output = RefDeleteOutput
The concrete output type that
Operation::execute produces.Auto Trait Implementations§
impl Freeze for RefDelete
impl RefUnwindSafe for RefDelete
impl Send for RefDelete
impl Sync for RefDelete
impl Unpin for RefDelete
impl UnsafeUnpin for RefDelete
impl UnwindSafe for RefDelete
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