Make use of cfg(doc) in sp-runtime-interface (#4673)

By using `cfg(doc)`, we can generate docs for modules which are only
available from `no_std`. This drastically improves the documentation for
the developers.
This commit is contained in:
Bastian Köcher
2020-01-19 01:51:03 +01:00
committed by Shawn Tabrizi
parent 26fa5193cd
commit 96cd57a695
4 changed files with 12 additions and 8 deletions
@@ -25,10 +25,10 @@
//! # Using a type in a runtime interface
//!
//! Any type that should be used in a runtime interface as argument or return value needs to
//! implement [`RIType`]. The associated type `FFIType` is the type that is used in the FFI
//! function to represent the actual type. For example `[T]` is represented by an `u64`. The slice
//! pointer and the length will be mapped to an `u64` value. For more information, see the
//! implementation of [`RIType`] for `T`. The FFI function definition is used when calling from
//! implement [`RIType`]. The associated type [`FFIType`](RIType::FFIType) is the type that is used
//! in the FFI function to represent the actual type. For example `[T]` is represented by an `u64`.
//! The slice pointer and the length will be mapped to an `u64` value. For more information see
//! this [table](#ffi-type-and-conversion). The FFI function definition is used when calling from
//! the wasm runtime into the node.
//!
//! Traits are used to convert from a type to the corresponding [`RIType::FFIType`].
@@ -265,7 +265,7 @@ pub use codec;
pub(crate) mod impls;
#[cfg(feature = "std")]
pub mod host;
#[cfg(not(feature = "std"))]
#[cfg(any(not(feature = "std"), doc))]
pub mod wasm;
pub mod pass_by;