Keyboard shortcuts

Press or to navigate between chapters

Press ? to show this help

Press Esc to hide this help

ModelStorageTest

A ModelStorage trait that abstracts where the storage is.

Currently it’s only world storage, but this will be useful when we have other storage solutions (micro worlds).

Fully qualified path: dojo::model::storage::ModelStorageTest

pub trait ModelStorageTest<S, M>

Trait functions

write_model_test

Sets a model of type M.

Fully qualified path: dojo::model::storage::ModelStorageTest::write_model_test

fn write_model_test(ref self: S, model: @M)

write_models_test

Sets multiple models of type M.

Fully qualified path: dojo::model::storage::ModelStorageTest::write_models_test

fn write_models_test(ref self: S, models: Span<@M>)

erase_model_test

Deletes a model of type M.

Fully qualified path: dojo::model::storage::ModelStorageTest::erase_model_test

fn erase_model_test(ref self: S, model: @M)

erase_models_test

Deletes multiple models of type M.

Fully qualified path: dojo::model::storage::ModelStorageTest::erase_models_test

fn erase_models_test(ref self: S, models: Span<@M>)

erase_model_ptr_test

Deletes a model of type M using the provided entity id.

Fully qualified path: dojo::model::storage::ModelStorageTest::erase_model_ptr_test

fn erase_model_ptr_test(ref self: S, ptr: ModelPtr<M>)

erase_models_ptrs_test

Deletes multiple models of type M using the provided entity ids.

Fully qualified path: dojo::model::storage::ModelStorageTest::erase_models_ptrs_test

fn erase_models_ptrs_test(ref self: S, ptrs: Span<ModelPtr<M>>)