pub struct RepoDiscover { /* private fields */ }Expand description
Discover a repository by walking parent directories.
Starts from start_path and walks upward until a .git directory is found.
§Examples
use ironflow_ops_git::repository::RepoDiscover;
use ironflow_core::operation::Operation;
let op = RepoDiscover::new("/path/to/subdir");
assert_eq!(op.kind(), "git");Implementations§
Source§impl RepoDiscover
impl RepoDiscover
Sourcepub async fn run(
&self,
_ctx: &OperationContext,
) -> Result<RepoDiscoverOutput, OperationError>
pub async fn run( &self, _ctx: &OperationContext, ) -> Result<RepoDiscoverOutput, OperationError>
Execute and return a typed result.
Trait Implementations§
Source§impl Operation for RepoDiscover
impl Operation for RepoDiscover
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 RepoDiscover
impl TypedOperation for RepoDiscover
Source§type Output = RepoDiscoverOutput
type Output = RepoDiscoverOutput
The concrete output type that
Operation::execute produces.Auto Trait Implementations§
impl Freeze for RepoDiscover
impl RefUnwindSafe for RepoDiscover
impl Send for RepoDiscover
impl Sync for RepoDiscover
impl Unpin for RepoDiscover
impl UnsafeUnpin for RepoDiscover
impl UnwindSafe for RepoDiscover
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