Keyboard shortcuts

Press or to navigate between chapters

Press ? to show this help

Press Esc to hide this help

ModelIndex

The ModelIndex provides encapsulation for different ways to access a model’s data.

  • Keys: Access by keys, where each individual key is known, and can be hashed.
  • Id: Access by id, where only the id of the entity is known (keys already hashed).
  • MemberId: Access by member id, where the member id and entity id are known.

Fully qualified path: dojo::model::definition::ModelIndex

pub enum ModelIndex {
    Keys: Span<felt252>,
    Id: felt252,
    MemberId: (felt252, felt252),
}

Variants

Keys

Fully qualified path: dojo::model::definition::ModelIndex::Keys

Keys: Span<felt252>

Id

Fully qualified path: dojo::model::definition::ModelIndex::Id

Id: felt252

MemberId

Fully qualified path: dojo::model::definition::ModelIndex::MemberId

MemberId: (felt252, felt252)