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

basic improvements to sp-runtime docs #14583

Merged
merged 1 commit into from
Jul 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
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
5 changes: 2 additions & 3 deletions primitives/runtime/src/generic/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.

// tag::description[]
//! Generic implementations of Extrinsic/Header/Block.
// end::description[]
//! Generic implementations of [`crate::traits::Header`], [`crate::traits::Block`] and
//! [`crate::traits::Extrinsic`].

mod block;
mod checked_extrinsic;
Expand Down
27 changes: 26 additions & 1 deletion primitives/runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,32 @@
// See the License for the specific language governing permissions and
// limitations under the License.

//! Runtime Modules shared primitive types.
//! # Substrate Runtime Primitives.
//!
//! This crate, among other things, contains a large library of types and utilities that are used in
//! the Substrate runtime, but are not particularly `FRAME`-oriented.
//!
//! ## Block, Header and Extrinsics
//!
//! Most notable, this crate contains some of the types and trait that enable important
//! communication between the client and the runtime. This includes:
//!
//! - A set of traits to declare what any block/header/extrinsic type should provide.
//! - [`traits::Block`], [`traits::Header`], [`traits::Extrinsic`]
//! - A set of types that implement these traits, whilst still providing a high degree of
//! configurability via generics.
//! - [`generic::Block`], [`generic::Header`], [`generic::UncheckedExtrinsic`] and
//! [`generic::CheckedExtrinsic`]
//!
//! ## Runtime API Types
//!
//! This crate also contains some types that are often used in conjuncture with Runtime APIs. Most
//! notable:
//!
//! - [`ApplyExtrinsicResult`], and [`DispatchOutcome`], which dictate how the client and runtime
//! communicate about the success or failure of an extrinsic.
//! - [`transaction_validity`], which dictates how the client and runtime communicate about the
//! validity of an extrinsic while still in the transaction-queue.

#![warn(missing_docs)]
#![cfg_attr(not(feature = "std"), no_std)]
Expand Down