mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-09 20:11:09 +00:00
Fix docs (#5928)
* Fix docs * Update frame/support/src/dispatch.rs Prettier link Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com> * Update primitives/runtime/src/traits.rs Prettier link Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com> Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
This commit is contained in:
@@ -17,7 +17,7 @@
|
||||
//! Substrate block builder
|
||||
//!
|
||||
//! This crate provides the [`BlockBuilder`] utility and the corresponding runtime api
|
||||
//! [`BlockBuilder`](api::BlockBuilder).Error
|
||||
//! [`BlockBuilder`](sp_block_builder::BlockBuilder).Error
|
||||
//!
|
||||
//! The block builder utility is used in the node as an abstraction over the runtime api to
|
||||
//! initialize a block, to push extrinsics and to finalize a block.
|
||||
|
||||
@@ -65,7 +65,7 @@
|
||||
//!
|
||||
//! ##### Renouncing candidacy.
|
||||
//!
|
||||
//! All candidates, elected or not, can renounce their candidacy. A call to [`renounce_candidacy`]
|
||||
//! All candidates, elected or not, can renounce their candidacy. A call to [`Module::renounce_candidacy`]
|
||||
//! will always cause the candidacy bond to be refunded.
|
||||
//!
|
||||
//! Note that with the members being the default candidates for the next round and votes persisting
|
||||
|
||||
@@ -144,12 +144,12 @@ use proc_macro::TokenStream;
|
||||
///
|
||||
/// * `#vis`: Set the visibility of the structure. `pub` or nothing.
|
||||
/// * `#name`: Name of the storage item, used as a prefix in storage.
|
||||
/// * [optional] `get(fn #getter)`: Implements the function #getter to `Module`.
|
||||
/// * [optional] `config(#field_name)`: `field_name` is optional if get is set.
|
||||
/// * \[optional\] `get(fn #getter)`: Implements the function #getter to `Module`.
|
||||
/// * \[optional\] `config(#field_name)`: `field_name` is optional if get is set.
|
||||
/// Will include the item in `GenesisConfig`.
|
||||
/// * [optional] `build(#closure)`: Closure called with storage overlays.
|
||||
/// * \[optional\] `build(#closure)`: Closure called with storage overlays.
|
||||
/// * `#type`: Storage type.
|
||||
/// * [optional] `#default`: Value returned when none.
|
||||
/// * \[optional\] `#default`: Value returned when none.
|
||||
///
|
||||
/// Storage items are accessible in multiple ways:
|
||||
///
|
||||
|
||||
@@ -106,7 +106,7 @@ impl<T> Parameter for T where T: Codec + EncodeLike + Clone + Eq + fmt::Debug {}
|
||||
/// ### Shorthand Example
|
||||
///
|
||||
/// The macro automatically expands a shorthand function declaration to return the
|
||||
/// [`DispatchResult`] type. These functions are the same:
|
||||
/// [`DispatchResult`](dispatch::DispatchResult) type. These functions are the same:
|
||||
///
|
||||
/// ```
|
||||
/// # #[macro_use]
|
||||
@@ -133,7 +133,7 @@ impl<T> Parameter for T where T: Codec + EncodeLike + Clone + Eq + fmt::Debug {}
|
||||
/// ### Consuming only portions of the annotated static weight
|
||||
///
|
||||
/// Per default a callable function consumes all of its static weight as declared via
|
||||
/// the #[weight] attribute. However, there are use cases where only a portion of this
|
||||
/// the #\[weight\] attribute. However, there are use cases where only a portion of this
|
||||
/// weight should be consumed. In that case the static weight is charged pre dispatch and
|
||||
/// the difference is refunded post dispatch.
|
||||
///
|
||||
|
||||
@@ -24,10 +24,10 @@
|
||||
//! chance to be included by the transaction queue.
|
||||
//!
|
||||
//! Additionally, this module allows one to configure:
|
||||
//! - The mapping between one unit of weight to one unit of fee via [`WeightToFee`].
|
||||
//! - The mapping between one unit of weight to one unit of fee via [`Trait::WeightToFee`].
|
||||
//! - A means of updating the fee for the next block, via defining a multiplier, based on the
|
||||
//! final state of the chain at the end of the previous block. This can be configured via
|
||||
//! [`FeeMultiplierUpdate`]
|
||||
//! [`Trait::FeeMultiplierUpdate`]
|
||||
|
||||
#![cfg_attr(not(feature = "std"), no_std)]
|
||||
|
||||
|
||||
@@ -152,7 +152,7 @@ pub trait Proposer<B: BlockT> {
|
||||
///
|
||||
/// # Return
|
||||
///
|
||||
/// Returns a future that resolves to a [`Proposal`] or to [`Self::Error`].
|
||||
/// Returns a future that resolves to a [`Proposal`] or to [`Error`].
|
||||
fn propose(
|
||||
&mut self,
|
||||
inherent_data: InherentData,
|
||||
|
||||
@@ -873,7 +873,7 @@ pub trait Pair: CryptoType + Sized + Clone + Send + Sync + 'static {
|
||||
|
||||
/// Interprets the string `s` in order to generate a key pair.
|
||||
///
|
||||
/// See [`from_string_with_seed`](Self::from_string_with_seed) for more extensive documentation.
|
||||
/// See [`from_string_with_seed`](Pair::from_string_with_seed) for more extensive documentation.
|
||||
#[cfg(feature = "std")]
|
||||
fn from_string(s: &str, password_override: Option<&str>) -> Result<Self, SecretStringError> {
|
||||
Self::from_string_with_seed(s, password_override).map(|x| x.0)
|
||||
|
||||
@@ -639,7 +639,7 @@ fn reduce_all<A: IdentifierT>(assignments: &mut Vec<StakedAssignment<A>>) -> u32
|
||||
num_changed
|
||||
}
|
||||
|
||||
/// Reduce the given [`PhragmenResult`]. This removes redundant edges from without changing the
|
||||
/// Reduce the given [`Vec<StakedAssignment<IdentifierT>>`]. This removes redundant edges from without changing the
|
||||
/// overall backing of any of the elected candidates.
|
||||
///
|
||||
/// Returns the number of edges removed.
|
||||
|
||||
@@ -1301,7 +1301,7 @@ impl Printable for Tuple {
|
||||
}
|
||||
}
|
||||
|
||||
/// Something that can convert a [`BlockId`] to a number or a hash.
|
||||
/// Something that can convert a [`BlockId`](crate::generic::BlockId) to a number or a hash.
|
||||
#[cfg(feature = "std")]
|
||||
pub trait BlockIdTo<Block: self::Block> {
|
||||
/// The error type that will be returned by the functions.
|
||||
|
||||
@@ -98,9 +98,9 @@ pub struct StorageChanges<Transaction, H: Hasher, N: BlockNumber> {
|
||||
/// Offchain state changes to write to the offchain database.
|
||||
pub offchain_storage_changes: OffchainOverlayedChanges,
|
||||
/// A transaction for the backend that contains all changes from
|
||||
/// [`main_storage_changes`](Self::main_storage_changes) and from
|
||||
/// [`child_storage_changes`](Self::child_storage_changes).
|
||||
/// [`offchain_storage_changes`](Self::offchain_storage_changes).
|
||||
/// [`main_storage_changes`](StorageChanges::main_storage_changes) and from
|
||||
/// [`child_storage_changes`](StorageChanges::child_storage_changes).
|
||||
/// [`offchain_storage_changes`](StorageChanges::offchain_storage_changes).
|
||||
pub transaction: Transaction,
|
||||
/// The storage root after applying the transaction.
|
||||
pub transaction_storage_root: H::Out,
|
||||
|
||||
@@ -306,7 +306,7 @@ impl<H, N, V> ForkTree<H, N, V> where
|
||||
}
|
||||
}
|
||||
|
||||
/// Same as [`find_node_where`](Self::find_node_where), but returns mutable reference.
|
||||
/// Same as [`find_node_where`](ForkTree::find_node_where), but returns mutable reference.
|
||||
pub fn find_node_where_mut<F, E, P>(
|
||||
&mut self,
|
||||
hash: &H,
|
||||
@@ -331,7 +331,7 @@ impl<H, N, V> ForkTree<H, N, V> where
|
||||
Ok(None)
|
||||
}
|
||||
|
||||
/// Same as [`find_node_where`](Self::find_node_where), but returns indexes.
|
||||
/// Same as [`find_node_where`](ForkTree::find_node_where), but returns indexes.
|
||||
pub fn find_node_index_where<F, E, P>(
|
||||
&self,
|
||||
hash: &H,
|
||||
|
||||
@@ -169,7 +169,7 @@ impl WasmBuilderSelectSource {
|
||||
/// 3. Select the source of the `wasm-builder` crate using the methods of
|
||||
/// [`WasmBuilderSelectSource`].
|
||||
/// 4. Set additional `RUST_FLAGS` or a different name for the file containing the WASM code
|
||||
/// using methods of [`Self`].
|
||||
/// using methods of [`WasmBuilder`].
|
||||
/// 5. Build the WASM binary using [`Self::build`].
|
||||
pub struct WasmBuilder {
|
||||
/// Where should we pull the `wasm-builder` crate from.
|
||||
|
||||
Reference in New Issue
Block a user