Refine docs.
This commit is contained in:
@@ -16,6 +16,18 @@ Indexers are disabled when the [`no_index`] feature is used.
|
||||
For efficiency reasons, indexers **cannot** be used to overload (i.e. override) built-in indexing operations for
|
||||
[arrays] and [object maps].
|
||||
|
||||
| `Engine` API | Description | Return Value of Function |
|
||||
| ----------------------------- | -------------------------------------------------------- | :-----------------------------------: |
|
||||
| `register_indexer_get` | Register an index getter | _Any_ |
|
||||
| `register_indexer_set` | Register an index setter | _Any_ |
|
||||
| `register_indexer_get_set` | Short-hand to register both an index getter and a setter | _None_ |
|
||||
| `register_indexer_get_result` | Register an index getter | `Result<Dynamic, Box<EvalAltResult>>` |
|
||||
| `register_indexer_set_result` | Register an index setter | `Result<Dynamic, Box<EvalAltResult>>` |
|
||||
|
||||
|
||||
Examples
|
||||
--------
|
||||
|
||||
```rust
|
||||
#[derive(Clone)]
|
||||
struct TestStruct {
|
||||
|
Reference in New Issue
Block a user