Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Improve doc for storages in srml-support #3982

Merged
merged 2 commits into from
Oct 31, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions srml/support/src/storage/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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](./generator/trait.StorageValue.html)
bkchr marked this conversation as resolved.
Show resolved Hide resolved
pub trait StorageValue<T: FullCodec> {
/// The type that get/take return.
type Query;
Expand Down Expand Up @@ -113,6 +116,9 @@ pub trait StorageValue<T: FullCodec> {
}

/// A strongly-typed map in storage.
///
/// Details on implementation can be found at
/// [generator::StorageMap](./generator/trait.StorageMap.html)
bkchr marked this conversation as resolved.
Show resolved Hide resolved
pub trait StorageMap<K: FullEncode, V: FullCodec> {
/// The type that get/take return.
type Query;
Expand Down Expand Up @@ -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](./generator/trait.StorageLinkedMap.html)
bkchr marked this conversation as resolved.
Show resolved Hide resolved
pub trait StorageLinkedMap<K: FullCodec, V: FullCodec> {
/// The type that get/take return.
type Query;
Expand Down Expand Up @@ -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](./generator/trait.StorageDoubleMap.html)
bkchr marked this conversation as resolved.
Show resolved Hide resolved
pub trait StorageDoubleMap<K1: FullEncode, K2: FullEncode, V: FullCodec> {
/// The type that get/take returns.
type Query;
Expand Down