pub fn validate_task_id(id: &str) -> Result<(), NikaError>Expand description
Validate a task ID without regex overhead
Manual implementation for optimal performance:
- O(n) single-pass validation
- Zero allocations
- No regex compilation overhead
Valid task IDs:
- Start with lowercase letter [a-z]
- Contain only lowercase letters, digits, underscores [a-z0-9_]*
Invalid patterns:
- Dashes:
fetch-api(usefetch_api) - Uppercase:
myTask(usemy_task) - Dots:
weather.api(dots reserved for paths) - Numbers first:
123task(must start with letter) - Leading underscore:
_private(not idiomatic)