Document all v14, v13 and most of v8 items (#33)

* Document all v14, v13 and most of v8 items

* Clarify what a `StorageEntryModifier` is.
This commit is contained in:
David
2021-12-13 10:00:21 +01:00
committed by GitHub
parent 03b8afacfb
commit f0c7151a95
9 changed files with 191 additions and 12 deletions
+7 -1
View File
@@ -18,6 +18,8 @@
//! Metadata Version 10. Networks like Kusama contain this version on-chain.
//! Chains old enough to contain this metadata need a way to decode it.
#![allow(missing_docs)]
use crate::decode_different::*;
use codec::{Encode, Output};
@@ -195,7 +197,11 @@ pub enum StorageEntryType {
},
}
/// A storage entry modifier.
/// A storage entry modifier indicates how a storage entry is returned when fetched and what the value will be if the key is not present.
/// Specifically this refers to the "return type" when fetching a storage entry, and what the value will be if the key is not present.
///
/// `Optional` means you should expect an `Option<T>`, with `None` returned if the key is not present.
/// `Default` means you should expect a `T` with the default value of default if the key is not present.
#[derive(Clone, PartialEq, Eq, Encode)]
#[cfg_attr(feature = "std", derive(Decode, Serialize, Debug))]
pub enum StorageEntryModifier {