Skip to main content

Crate beetry_exec

Crate beetry_exec 

Source
Expand description

§Beetry Exec

This crate is an internal Beetry implementation crate and is not considered part of the public API. For public APIs, use the beetry crate.

beetry-exec provides a task executor for Beetry action tasks.

The crate provides the following types:

§Lifecycle

The executor is constructed in a setup state:

  1. Create an executor with Executor::new
  2. Split it into a runnable executor and a task registry with Executor::into_ready_with_registry
  3. Spawn or await ExecutorConcept::run on the ready executor
  4. Use the registry to register ActionTask instances from elsewhere in the application

This staged API makes it easy to hand the registry to tree code while the executor runs in a dedicated task.

Structs§

ExecutionTask
Executor
A Beetry executor parameterized by its lifecycle state.
ExecutorConfig
Configuration for an Executor.
ExecutorConfigBuilder
Use builder syntax to set the inputs and finish with build().
Init
Marker type for the pre-initialization executor state.
Ready
Marker type for the runnable executor state.
TaskHandle
Handle for querying and aborting a registered task.
TaskRegistry
Registers ActionTask values with a running Executor.
WithRegistry
Executor state containing the task registry before startup is finalized.