pub struct GraphAheadBehind { /* private fields */ }Expand description
Count commits ahead and behind between two references.
§Examples
use ironflow_ops_git::graph::GraphAheadBehind;
use ironflow_core::operation::Operation;
let op = GraphAheadBehind::new("/path/to/repo", "abc123", "def456");
assert_eq!(op.kind(), "git");Implementations§
Source§impl GraphAheadBehind
impl GraphAheadBehind
Sourcepub fn new(
repo_path: impl Into<PathBuf>,
local: impl Into<String>,
upstream: impl Into<String>,
) -> Self
pub fn new( repo_path: impl Into<PathBuf>, local: impl Into<String>, upstream: impl Into<String>, ) -> Self
Create a new ahead-behind operation.
Sourcepub async fn run(
&self,
_ctx: &OperationContext,
) -> Result<GraphAheadBehindOutput, OperationError>
pub async fn run( &self, _ctx: &OperationContext, ) -> Result<GraphAheadBehindOutput, OperationError>
Execute and return a typed result.
Trait Implementations§
Source§impl Operation for GraphAheadBehind
impl Operation for GraphAheadBehind
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 GraphAheadBehind
impl TypedOperation for GraphAheadBehind
Source§type Output = GraphAheadBehindOutput
type Output = GraphAheadBehindOutput
The concrete output type that
Operation::execute produces.Auto Trait Implementations§
impl Freeze for GraphAheadBehind
impl RefUnwindSafe for GraphAheadBehind
impl Send for GraphAheadBehind
impl Sync for GraphAheadBehind
impl Unpin for GraphAheadBehind
impl UnsafeUnpin for GraphAheadBehind
impl UnwindSafe for GraphAheadBehind
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