mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-12 19:21:13 +00:00
Improve doc for storages in srml-support (#3982)
* improve doc * Apply suggestions from code review
This commit is contained in:
@@ -28,6 +28,9 @@ pub mod child;
|
||||
pub mod generator;
|
||||
|
||||
/// A trait for working with macro-generated storage values under the substrate storage API.
|
||||
///
|
||||
/// Details on implementation can be found at
|
||||
/// [`generator::StorageValue`]
|
||||
pub trait StorageValue<T: FullCodec> {
|
||||
/// The type that get/take return.
|
||||
type Query;
|
||||
@@ -113,6 +116,9 @@ pub trait StorageValue<T: FullCodec> {
|
||||
}
|
||||
|
||||
/// A strongly-typed map in storage.
|
||||
///
|
||||
/// Details on implementation can be found at
|
||||
/// [`generator::StorageMap`]
|
||||
pub trait StorageMap<K: FullEncode, V: FullCodec> {
|
||||
/// The type that get/take return.
|
||||
type Query;
|
||||
@@ -180,6 +186,9 @@ pub trait StorageMap<K: FullEncode, V: FullCodec> {
|
||||
/// A strongly-typed linked map in storage.
|
||||
///
|
||||
/// Similar to `StorageMap` but allows to enumerate other elements and doesn't implement append.
|
||||
///
|
||||
/// Details on implementation can be found at
|
||||
/// [`generator::StorageLinkedMap`]
|
||||
pub trait StorageLinkedMap<K: FullCodec, V: FullCodec> {
|
||||
/// The type that get/take return.
|
||||
type Query;
|
||||
@@ -229,6 +238,9 @@ pub trait StorageLinkedMap<K: FullCodec, V: FullCodec> {
|
||||
///
|
||||
/// It provides an important ability to efficiently remove all entries
|
||||
/// that have a common first key.
|
||||
///
|
||||
/// Details on implementation can be found at
|
||||
/// [`generator::StorageDoubleMap`]
|
||||
pub trait StorageDoubleMap<K1: FullEncode, K2: FullEncode, V: FullCodec> {
|
||||
/// The type that get/take returns.
|
||||
type Query;
|
||||
|
||||
Reference in New Issue
Block a user