hippox-drivers 0.3.1

πŸ¦›All indivisible atomic driver units in Hippox.
docs.rs failed to build hippox-drivers-0.3.1
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.

Working Principle

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                      SKILL REGISTRY                        β”‚
β”‚                                                           β”‚
β”‚  SkillRegistryMap = HashMap<SkillCategory,               β”‚
β”‚                      HashMap<String, Arc<dyn Skill>>>    β”‚
β”‚                                                           β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”              β”‚
β”‚  β”‚ File     β”‚  β”‚ Math     β”‚  β”‚ Net      β”‚              β”‚
β”‚  β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€  β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€  β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€              β”‚
β”‚  β”‚ read     β”‚  β”‚ calc     β”‚  β”‚ http     β”‚              β”‚
β”‚  β”‚ write    β”‚  β”‚ power    β”‚  β”‚ ping     β”‚              β”‚
β”‚  β”‚ delete   β”‚  β”‚ stats    β”‚  β”‚ dns      β”‚              β”‚
β”‚  β”‚ ...      β”‚  β”‚ ...      β”‚  β”‚ ...      β”‚              β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜              β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Registration:

  Compile-time: file_register() / math_register() / net_register()
  Runtime: register_skill(category, name, skill)

Query:

  get_skill_by_name("read") β†’ Skill impl β†’ execute()

Core Type

pub type SkillRegistryMap = HashMap<SkillCategory, HashMap<String, Arc<dyn Skill>>>;

Main Functions

Function Description
get_registry() Get read lock on the registry
get_registry_mut() Get write lock on the registry
register_skill(category, name, skill) Dynamically register a skill
get_all_skills() Get all registered skills
get_skill_by_name(name) Find a skill by name
get_skill_by_name_and_category(name, category) Find a skill by name and category
has_skill(name) Check if a skill exists
list_skills_names() List all skill names
list_skills_name_by_category(category) List skill names in a category
get_skills_by_category(category) Get skills by category string
get_skills_by_category_list(categories) Get skills by multiple categories
list_skills_name_by_category_list(categories) List skill names by multiple categories
get_all_categorys() Get all category names
get_skill_category() Get categories with skill counts
get_skill_category_names() Get all category names
get_skill_category_name_and_describe() Get category names with descriptions
generate_skill_registry_table_json_str() Generate registry JSON string

SkillCategory Methods

Method Description
from_str(s) Convert string to enum
name() Convert enum to string (lowercase)
display_name() Get human-readable display name
description() Get category description
icon() Get category icon/emoji
priority() Get display priority (lower = first)
metadata() Get complete category metadata
all_categories() Get metadata for all categories