Skip to content

Commit

Permalink
Updates.
Browse files Browse the repository at this point in the history
  • Loading branch information
DariuszDepta committed Feb 5, 2025
1 parent 9d73a88 commit 9fbde57
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/pages/cw-multi-test/storage.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -50,21 +50,21 @@ let app = App::default();
let app = AppBuilder::default().build(no_init);
```

The [`App{:rust}`][App] provides several methods to access and manipulate storage, all of which are
covered in the [Accessing storage in tests](#accessing-storage-in-tests) section.
The [`App{:rust}`][App] provides several methods to access and manipulate the storage, all of which
are covered in the [Accessing storage in tests](#accessing-storage-in-tests) section.

## Custom storage

If the default storage does not fully meet your testing requirements, you can provide a custom
storage by implementing the [Storage] trait. Only the `get{:rust}`, `set{:rust}`,`remove{:rust}` and
`range{:rust}` methods are required, as the trait already provides a basic implementation for
`range_keys{:rust}` and `range_values{:rust}`. The table below summarizes all these methods.
`range_keys{:rust}` and `range_values{:rust}` methods. The table below summarizes all these methods.

| Methods of [Storage] trait | Description |
| ------------------------------------- | ------------------------------------------------------------------------- |
| [`get{:rust}`][get] | Returns a value associated with specified key. |
| [`set{:rust}`][set] | Sets a new value for specified key. |
| [`remove{:rust}`][remove] | Removes an entry with specified key. |
| [`get{:rust}`][get] | Returns a value associated with a specified key. |
| [`set{:rust}`][set] | Sets a new value for a specified key. |
| [`remove{:rust}`][remove] | Removes an entry with a specified key. |
| [`range{:rust}`][range] | Iterates over a set of **key/value** pairs, either forwards or backwards. |
| [`range_keys{:rust}`][range_keys] | Iterates over a set of **keys**, either forwards or backwards. |
| [`range_values{:rust}`][range_values] | Iterates over a set of **values**, either forwards or backwards. |
Expand Down

0 comments on commit 9fbde57

Please sign in to comment.