pub struct RunnerRegistry { /* private fields */ }Expand description
Maps runner names to StepRunner implementations.
Constructed once at startup and shared immutably for the duration of the run.
Implementations§
Source§impl RunnerRegistry
impl RunnerRegistry
Sourcepub fn register(&mut self, runner: Arc<dyn StepRunner>, is_default: bool)
pub fn register(&mut self, runner: Arc<dyn StepRunner>, is_default: bool)
Register a runner. When is_default is true the runner’s name
becomes the fallback used by Self::resolve when no explicit
name is given.
Sourcepub fn resolve(&self, name: Option<&str>) -> Option<Arc<dyn StepRunner>>
pub fn resolve(&self, name: Option<&str>) -> Option<Arc<dyn StepRunner>>
Look up a runner by name, falling back to the default when
name is None.
Sourcepub fn default_runner_name(&self) -> Option<&str>
pub fn default_runner_name(&self) -> Option<&str>
The name of the current default runner, if one has been set.
Sourcepub fn runner_names(&self) -> Vec<&str>
pub fn runner_names(&self) -> Vec<&str>
Sorted list of all registered runner names.
Trait Implementations§
Source§impl Debug for RunnerRegistry
impl Debug for RunnerRegistry
Source§impl Default for RunnerRegistry
impl Default for RunnerRegistry
Source§fn default() -> RunnerRegistry
fn default() -> RunnerRegistry
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for RunnerRegistry
impl !UnwindSafe for RunnerRegistry
impl Freeze for RunnerRegistry
impl Send for RunnerRegistry
impl Sync for RunnerRegistry
impl Unpin for RunnerRegistry
impl UnsafeUnpin for RunnerRegistry
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