behaviortree-core 0.1.0

Core implementaion of behaviortree
Documentation
// Copyright © 2025 Stephan Kunz
//! [`BehaviorTree`](crate::tree) tree errors.

use thiserror::Error;

use crate::ConstString;

/// Tree errors
#[derive(Error, Debug)]
pub enum Error {
	/// element with index is not found
	#[error("the subtree with the index {index} cannot be found")]
	SubtreeNotFound {
		/// The affected index
		index: usize,
	},
	/// Invalid Groot request type
	#[error("an invalid request type {value} was sent from Groot2")]
	InvalidRequestType {
		/// The request type value
		value: u8,
	},
	/// Recursion limit  of 127 is reached
	#[error("recursion limit of '127' is reached for behavior {behavior}")]
	RecursionLimit {
		/// The affected behavior
		behavior: ConstString,
	},
}