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
+5
View File
@@ -20,6 +20,7 @@ use codec::{Encode, Output};
cfg_if::cfg_if! {
if #[cfg(feature = "std")] {
use codec::{Decode, Error, Input};
/// On `std` the `StringBuf` used by [`DecodeDifferent`] is just a `String`.
pub type StringBuf = String;
} else {
extern crate alloc;
@@ -41,7 +42,9 @@ where
B: 'static,
O: 'static,
{
/// Encodable variant of the value (doesn't need to be decodeable).
Encode(B),
/// Encodable & decodeable variant of the value.
Decoded(O),
}
@@ -123,8 +126,10 @@ where
}
}
/// An array type that decodes as a `Vec`.
pub type DecodeDifferentArray<B, O = B> = DecodeDifferent<&'static [B], Vec<O>>;
/// A string type that decodes as a [`StringBuf`].
pub type DecodeDifferentStr = DecodeDifferent<&'static str, StringBuf>;
/// Newtype wrapper for support encoding functions (actual the result of the function).