Expand description
Polymorphic indexing traits for Logos collections.
Logos uses 1-based indexing to match natural language conventions. These traits provide get/set operations that automatically convert 1-based indices to 0-based for underlying Rust collections.
§Supported Collections
Vec<T>: Indexed byi64(1-based, converted to 0-based internally)- [
HashMap<K, V>]: Indexed by keyK(pass-through semantics) - [
HashMap<String, V>]: Also supports&strkeys for convenience
§Panics
Vector indexing operations panic if the index is out of bounds (less than 1 or greater than collection length). Map operations panic if the key is not found.
Traits§
- Logos
GetChar - Zero-allocation character access for string comparisons.
- Logos
Index - Immutable element access by index.
- Logos
Index Mut - Mutable element access by index.