@@ -98,14 +98,16 @@ The `MyMapAccess` struct is our accessor. It's a facade that's used to actually
9898the collection given a ` Storage ` instance - this is usually a subspace of the "root" storage
9999backend.
100100
101- The [ ` Storable ` ] trait is the main trait a container must implement. The associated types tell the framework:
101+ The [ ` Storable ` ] trait is the main trait a container must implement. The associated types tell the
102+ framework:
102103
103- | Associated type | Details |
104- | -------------------| -------------------------------------------------------------------------|
105- | ` Kind ` | We put ` NonTerminal ` here to signify our container creates subkeys rather than just saving data at the root. |
106- | ` Accessor ` | The accessor type. ` MyMapAccess ` in our case. |
104+ | Associated type | Details |
105+ | --------------- | ------------------------------------------------------------------------------------------------------------ |
106+ | ` Kind ` | We put ` NonTerminal ` here to signify our container creates subkeys rather than just saving data at the root. |
107+ | ` Accessor ` | The accessor type. ` MyMapAccess ` in our case. |
107108
108- The method ` access_impl ` produces an accessor given a storage abstraction (usually representing a "slice" of the underlying storage.)
109+ The method ` access_impl ` produces an accessor given a storage abstraction (usually representing a
110+ "slice" of the underlying storage.)
109111
110112` MyMap::access ` is an access method in cases where you're using the container as a top-level
111113container.
@@ -205,17 +207,17 @@ assert_eq!(access.entry(2).get().unwrap(), Some(200));
205207
206208To be continued...
207209
208- | Associated type | Details |
209- | ------------------- | -------------------------------------------------------------------------|
210- | ` Key ` | The key type to be returned by iterators. Here a tuple of ` u32 ` and the key type of the inner container. |
211- | ` KeyDecodeError ` | The error to be returned on invalid key data. Here we don't care, so we use ` () ` . In production, use a proper error type. |
212- | ` Value ` | The value type to be returned by iterators. Here it's delegated to the inner container. |
213- | ` ValueDecodeError ` | The error type for invalid value data. Delegated to the inner container. |
214-
215- The methods:
216- | Method | Function |
217- | ---------------- | ----------------------------------------------------------------------------- |
218- | ` decode_value ` | Used for iteration. This is how the framework knows how to decode values given raw data. |
210+ | Associated type | Details |
211+ | ------------------ | ------------------------------------------------------------------------------------------------------------------------- |
212+ | ` Key ` | The key type to be returned by iterators. Here a tuple of ` u32 ` and the key type of the inner container. |
213+ | ` KeyDecodeError ` | The error to be returned on invalid key data. Here we don't care, so we use ` () ` . In production, use a proper error type. |
214+ | ` Value ` | The value type to be returned by iterators. Here it's delegated to the inner container. |
215+ | ` ValueDecodeError ` | The error type for invalid value data. Delegated to the inner container. |
216+
217+ The methods: | Method | Function |
218+ | ---------------- | ----------------------------------------------------------------------------- | |
219+ ` decode_value ` | Used for iteration. This is how the framework knows how to decode values given raw
220+ data. |
219221
220222```
221223impl<V> IterableStorable for MyMap<V>
0 commit comments