pub trait LogosIndex<I> {
type Output;
// Required method
fn logos_get(&self, index: I) -> Self::Output;
}Expand description
Immutable element access by index.
Provides 1-based indexing for Logos collections. Index 1 refers
to the first element, index 2 to the second, and so on.
§Examples
use logicaffeine_data::LogosIndex;
let v = vec!["a", "b", "c"];
assert_eq!(v.logos_get(1i64), "a"); // 1-based!
assert_eq!(v.logos_get(3i64), "c");§Panics
Panics if the index is less than 1 or greater than the collection length.