Expand description
Shareable Substrate types.
Re-exports§
pub use self::hash::convert_hash;
pub use crypto::ByteArray;
pub use crypto::DeriveJunction;
pub use crypto::Pair;
pub use crypto::Public;
pub use serde;
pub use bounded_collections as bounded;
pub use sp_storage as storage;
Modules§
- Traits, types and structs to support a bounded BTreeMap.
- Traits, types and structs to support putting a bounded vector into storage, as a raw value, map or a double map.
- Cryptographic utilities.
- Contains the
crate::defer!
macro for deferring the execution of code until the current scope is dropped. This helps with always executing cleanup code. - Simple ECDSA secp256k1 API.
- Simple Ed25519 API.
- A fixed hash type.
- Hashing functions.
- Wrapper type for byte collections that outputs hex.
- Offchain workers types
- Simple sr25519 (Schnorr-Ristretto) API.
- Types that should only be used for testing!
- Shareable Substrate traits.
- An unsigned fixed-size integer.
Macros§
- Build a bounded btree-map from the given literals.
- Build a bounded vec from the given literals.
- Executes the given code when the current scope is dropped.
- Generates a macro for checking if a certain feature is enabled.
- Macro for creating
Maybe*
marker traits. - Initialize a key-value collection from array.
- Create new implementations of the
Get
trait. - Macro for exporting functions from wasm in with the expected signature for using it with the wasm executor. This is useful for tests where you need to call a function in wasm.
Structs§
- Concrete implementation of Hasher using Blake2b 256-bit hashes
- Hex-serialized shim for
Vec<u8>
. - Const getter for a basic type.
- Const getter for a basic type.
- Const getter for a basic type.
- Const getter for a basic type.
- Const getter for a basic type.
- Const getter for a basic type.
- Const getter for a basic type.
- Const getter for a basic type.
- Const getter for a basic type.
- Const getter for a basic type.
- Const getter for a basic type.
- Implement Get by returning Default for any type that implements Default.
- Fixed-size uninterpreted hash type with 20 bytes (160 bits) size.
- Fixed-size uninterpreted hash type with 32 bytes (256 bits) size.
- Fixed-size uninterpreted hash type with 64 bytes (512 bits) size.
- Concrete implementation of Hasher using Keccak 256-bit hashes
- Stores the encoded
RuntimeMetadata
for the native side as opaque type. - Simple blob to hold a
PeerId
without committing to its format. - Little-endian large integer type 256-bit unsigned integer.
- Little-endian large integer type 512-bits unsigned integer.
Enums§
- Context for executing a call into the runtime.
- A log level matching the one from
log
crate. - Log level filter that expresses which log levels should be filtered.
- The void type - it cannot exist.
Constants§
- The maximum number of bytes that can be allocated at one time.
Traits§
- A trait for querying a single value from a type.
- Trait describing an object that can hash a slice of bytes. Used to abstract other types over the hashing algorithm. Defines a single
hash
method and anOut
associated type with the necessary bounds. - Try and collect into a collection
C
. - Provide a simple 4 byte identifier for a type.
- A trait for querying a single value from a type defined in the trait.
Functions§
- Do a Blake2 128-bit hash and return result.
- Do a Blake2 256-bit hash and return result.
- Do a keccak 256-bit hash and return result.
- Do a XX 64-bit hash and return result.
- Do a XX 128-bit hash and return result.
- Do a XX 256-bit hash and return result.