pub struct Runner { /* private fields */ }Expand description
Analyzes and runs a specific Github Actions workflow.
Implementations§
Source§impl Runner
impl Runner
Sourcepub async fn new(
ctx: RunnerContext,
workflow: &[u8],
) -> Result<Runner, RunnerError>
pub async fn new( ctx: RunnerContext, workflow: &[u8], ) -> Result<Runner, RunnerError>
Create a new runner. workflow is the workflow YAML file contents.
Normally you would fetch this from Github but you can instead pass anything
you want here.
Sourcepub fn job_descriptions(&self) -> &[JobDescription]
pub fn job_descriptions(&self) -> &[JobDescription]
Get descriptions of all the jobs in the workflow.
Sourcepub async fn job_runner(
&self,
description: &JobDescription,
image_mapping: &DockerImageMapping,
) -> Result<JobRunner, RunnerError>
pub async fn job_runner( &self, description: &JobDescription, image_mapping: &DockerImageMapping, ) -> Result<JobRunner, RunnerError>
Create a JobRunner that can be used to run the given job.
Auto Trait Implementations§
impl !Freeze for Runner
impl !RefUnwindSafe for Runner
impl Send for Runner
impl Sync for Runner
impl Unpin for Runner
impl !UnwindSafe for Runner
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more