Skip to main content

GhRunner

Trait GhRunner 

Source
pub trait GhRunner {
    // Required method
    fn execute(
        &mut self,
        request: &GhRequest,
    ) -> Result<Vec<u8>, GhExecutionError>;

    // Provided method
    fn workflow_dispatch_client_factory(
        &self,
    ) -> Result<Box<dyn GithubWorkflowDispatchHttpClientFactory>, GhExecutionError> { ... }
}
Expand description

Injectable executor for planned GitHub API requests.

Required Methods§

Source

fn execute(&mut self, request: &GhRequest) -> Result<Vec<u8>, GhExecutionError>

Execute one request and return bounded stdout bytes.

§Errors

Returns only redacted process failure categories.

Provided Methods§

Source

fn workflow_dispatch_client_factory( &self, ) -> Result<Box<dyn GithubWorkflowDispatchHttpClientFactory>, GhExecutionError>

Clone a lazy, credential-owning factory for one direct workflow dispatch client.

Implementations must not read credentials or access the network until the returned factory is consumed. Callers consume it before publishing a temporary ref or committing a durable dispatch intent, so deterministic credential failures cannot strand that intent.

§Errors

Returns a redacted authentication or client-construction failure.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§