pub struct RecipeTree {
pub name: String,
pub path: Utf8PathBuf,
pub recipe: Option<RecipeEntry>,
pub children: HashMap<String, RecipeTree>,
}
Expand description
Represents a node in a hierarchical recipe directory tree.
Each node can represent either:
- A directory (with
recipe
= None and potentially non-emptychildren
) - A recipe file (with
recipe
= Some and emptychildren
)
The tree structure mirrors the filesystem hierarchy, making it easy to navigate and display recipes organized by their directory structure.
§Fields
name
- The name of this node (directory or recipe name)path
- The full filesystem path to this noderecipe
- Optional recipe data if this node represents a recipe filechildren
- Child nodes indexed by their names
Fields§
§name: String
Name of the current node (directory name or recipe name)
path: Utf8PathBuf
Full path to this node
recipe: Option<RecipeEntry>
If this is a recipe, contains the Recipe struct
children: HashMap<String, RecipeTree>
Child directories and recipes
Trait Implementations§
Source§impl Debug for RecipeTree
impl Debug for RecipeTree
Source§impl<'de> Deserialize<'de> for RecipeTree
impl<'de> Deserialize<'de> for RecipeTree
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl !Freeze for RecipeTree
impl RefUnwindSafe for RecipeTree
impl Send for RecipeTree
impl Sync for RecipeTree
impl Unpin for RecipeTree
impl UnwindSafe for RecipeTree
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