pub trait ListIndex<Idx: ?Sized> {
type Output;
// Required method
fn index(&self, index: Idx) -> &Self::Output;
}Expand description
Indexing for lists using typenum-based indices and ranges.
The index type establishes that the selected field or range exists.
§Examples
use cel_runtime::{IntoTupleList, ListIndex};
let list = ("first", 7u8).into_tuple_list();
assert_eq!(*list.index(typenum::U1::new()), 7);Required Associated Types§
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".