Skip to main content

Crate beetry_core

Crate beetry_core 

Source
Expand description

§Beetry Core

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-core defines foundational behavior tree framework traits and concepts.

§Node

Node is the central runtime trait in Beetry. Every control node, decorator, condition, action, or whole tree is ultimately driven through the same interface. This keeps the tree runtime uniform: composite nodes can schedule children without needing a different protocol from leaf nodes, and higher-level drivers only need to understand the node lifecycle.

§Ticker

Ticker ticks a tree from an external tick source.

Because Ticker can be built from a custom stream, each application can define its own ticking mechanism without changing the tree implementation.

§Leaf behavior concepts

§Condition

ConditionBehavior is the minimal synchronous leaf contract. It is used by Condition, which wraps the behavior and maps its condition evaluation to TickStatus::Success or TickStatus::Failure.

§Action

ActionBehavior is the asynchronous leaf contract used by Action. Action wraps the behavior and uses it to construct an ActionTask that can be registered with an executor instead of directly returning a TickStatus from tick.

Note: Action abort is currently implemented as a blocking operation: it signals the executor to abort the task, then waits until the task reaches a terminal state.

Re-exports§

pub use leaf::Action;
pub use leaf::ActionBehavior;
pub use leaf::BoxActionBehavior;
pub use leaf::BoxConditionBehavior;
pub use leaf::Condition;
pub use leaf::ConditionBehavior;

Modules§

leaf

Structs§

ActionTask
User-provided task that defines work to be executed when ticking an action node.
PeriodicTick
Built-in periodic tick source. Useful as the default in most applications.
Root
Root node.
TaskDescription
Ticker
Ticks a behavior tree using an external tick source.
Tree
Behavior tree rooted at a Root node.

Enums§

TaskStatus
TickStatus
Result of a single node tick.
TickerError
Errors that can occur while ticking a tree from a tick source.

Traits§

AbortTask
ExecutorConcept
Node
Runtime contract for executable behavior tree nodes.
QueryTask
RegisterTask
Task
TaskHandle

Type Aliases§

BoxNode
Boxed type-erased Node.
BoxTaskFuture
NonEmptyNodes
Non-empty collection of nodes.
PeriodicTicker