#[derive(Index)]
{
// Attributes available to this derive:
#[index]
}
Expand description
Implement Index for a structure.
ยงSample.
use derive_tools::Index;
#[ derive( Index ) ]
struct MyStruct( i32 );
let my_struct = MyStruct( 13 );
dbg!( my_struct[ 0 ] );To learn more about the feature, study the module derive_tools::Index.