pub struct RemoteLookup { /* private fields */ }Expand description
Look up a remote by name.
§Examples
use ironflow_ops_git::remote::RemoteLookup;
use ironflow_core::operation::Operation;
let op = RemoteLookup::new("/path/to/repo", "origin");
assert_eq!(op.kind(), "git");Implementations§
Source§impl RemoteLookup
impl RemoteLookup
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 remote-lookup operation.
Sourcepub async fn run(
&self,
_ctx: &OperationContext,
) -> Result<RemoteLookupOutput, OperationError>
pub async fn run( &self, _ctx: &OperationContext, ) -> Result<RemoteLookupOutput, OperationError>
Execute and return a typed result.
Trait Implementations§
Source§impl Operation for RemoteLookup
impl Operation for RemoteLookup
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 RemoteLookup
impl TypedOperation for RemoteLookup
Source§type Output = RemoteLookupOutput
type Output = RemoteLookupOutput
The concrete output type that
Operation::execute produces.Auto Trait Implementations§
impl Freeze for RemoteLookup
impl RefUnwindSafe for RemoteLookup
impl Send for RemoteLookup
impl Sync for RemoteLookup
impl Unpin for RemoteLookup
impl UnsafeUnpin for RemoteLookup
impl UnwindSafe for RemoteLookup
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