mirror of
https://github.com/pezkuwichain/pezframe-metadata.git
synced 2026-04-23 19:57:57 +00:00
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:
@@ -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).
|
||||
|
||||
Reference in New Issue
Block a user