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:
Executorruns registeredActionTaskvalues to completionTaskRegistryschedules new tasks and returns aTaskHandlefor querying or aborting them
§Lifecycle
The executor is constructed in a setup state:
- Create an executor with
Executor::new - Split it into a runnable executor and a task registry with
Executor::into_ready_with_registry - Spawn or await
ExecutorConcept::runon the ready executor - Use the registry to register
ActionTaskinstances 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§
- Execution
Task - Executor
- A Beetry executor parameterized by its lifecycle state.
- Executor
Config - Configuration for an
Executor. - Executor
Config Builder - 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.
- Task
Handle - Handle for querying and aborting a registered task.
- Task
Registry - Registers
ActionTaskvalues with a runningExecutor. - With
Registry - Executor state containing the task registry before startup is finalized.