Docs.rs
  • sp-core-32.0.0
    • sp-core 32.0.0
    • Docs.rs crate page
    • Apache-2.0
    • Links
    • Homepage
    • Repository
    • crates.io
    • Source
    • Owners
    • github:paritytech:core-devs
    • parity-crate-owner
    • Dependencies
      • array-bytes ^6.1 normal
      • parity-bip39 ^2.0.1 normal
      • bitflags ^1.3 normal
      • blake2 ^0.10.4 normal optional
      • bounded-collections ^0.2.0 normal
      • bs58 ^0.5.0 normal optional
      • parity-scale-codec ^3.6.1 normal
      • dyn-clonable ^0.9.0 normal optional
      • ed25519-zebra ^3.1.0 normal
      • futures ^0.3.30 normal optional
      • hash-db ^0.16.0 normal
      • hash256-std-hasher ^0.15.2 normal
      • impl-serde ^0.4.0 normal optional
      • itertools ^0.10.3 normal optional
      • k256 ^0.13.3 normal
      • libsecp256k1 ^0.7 normal
      • log ^0.4.21 normal
      • merlin ^3.0 normal
      • parking_lot ^0.12.1 normal optional
      • paste ^1.0.7 normal
      • primitive-types ^0.12.0 normal
      • rand ^0.8.5 normal optional
      • scale-info ^2.5.0 normal
      • schnorrkel ^0.11.4 normal
      • secp256k1 ^0.28.0 normal optional
      • secrecy ^0.8.0 normal
      • serde ^1.0.197 normal optional
      • sp-crypto-hashing ^0.1.0 normal
      • sp-debug-derive ^14.0.0 normal
      • sp-externalities ^0.28.0 normal optional
      • sp-runtime-interface ^27.0.0 normal
      • sp-std ^14.0.0 normal
      • sp-storage ^21.0.0 normal
      • ss58-registry ^1.34.0 normal
      • substrate-bip39 ^0.6.0 normal
      • thiserror ^1.0.48 normal optional
      • tracing ^0.1.29 normal optional
      • w3f-bls ^0.1.3 normal optional
      • zeroize ^1.4.3 normal
      • criterion ^0.4.0 dev
      • lazy_static ^1.4.0 dev
      • regex ^1.6.0 dev
      • serde_json ^1.0.114 dev
    • Versions
    • 100% of the crate is documented
  • Go to latest version
  • Platform
    • x86_64-unknown-linux-gnu
  • Feature flags
  • docs.rs
    • About docs.rs
    • Badges
    • Builds
    • Metadata
    • Shorthand URLs
    • Download
    • Rustdoc JSON
    • Build queue
    • Privacy policy
  • Rust
    • Rust website
    • The Book
    • Standard Library API Reference
    • Rust by Example
    • The Cargo Guide
    • Clippy Documentation

Crate sp_core

sp_core32.0.0

  • All Items
  • Re-exports
  • Modules
  • Macros
  • Structs
  • Enums
  • Constants
  • Traits
  • Functions
  • Derive Macros

Crates

  • sp_core
?
Change settings

Crate sp_core

source ·
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 sp_crypto_hashing as hashing;
  • pub use paste;
  • pub use bounded_collections as bounded;
  • pub use sp_storage as storage;

Modules§

  • bounded_btree_map
    Traits, types and structs to support a bounded BTreeMap.
  • bounded_vec
    Traits, types and structs to support putting a bounded vector into storage, as a raw value, map or a double map.
  • const_hex2array
    Provides a const function for converting a hex string to a u8 array at compile time, when used in the proper context.
  • crypto
    Cryptographic utilities.
  • crypto_bytes
    Generic byte array which can be specialized with a marker type.
  • defer
    Contains the crate::defer! macro for deferring the execution of code until the current scope is dropped. This helps with always executing cleanup code.
  • ecdsa
    Simple ECDSA secp256k1 API.
  • ed25519
    Simple Ed25519 API.
  • hash
    A fixed hash type.
  • hexdisplay
    Wrapper type for byte collections that outputs hex.
  • offchain
    Offchain workers types
  • paired_crypto
    API for using a pair of crypto schemes together.
  • sr25519
    Simple sr25519 (Schnorr-Ristretto) API.
  • testing
    Types that should only be used for testing!
  • traits
    Shareable Substrate traits.
  • uint
    An unsigned fixed-size integer.

Macros§

  • bounded_btree_map
    Build a bounded btree-map from the given literals.
  • bounded_vec
    Build a bounded vec from the given literals.
  • defer
    Executes the given code when the current scope is dropped.
  • generate_feature_enabled_macro
    Generates a macro for checking if a certain feature is enabled.
  • hex2array
    Provides a const array from given string literal.
  • impl_maybe_marker
    Macro for creating Maybe* marker traits.
  • impl_maybe_marker_std_or_serde
    Macro for creating Maybe* marker traits.
  • map
    Initialize a key-value collection from array.
  • parameter_types
    Create new implementations of the Get trait.
  • wasm_export_functions
    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§

  • Blake2Hasher
    Concrete implementation of Hasher using Blake2b 256-bit hashes
  • Bytes
    Hex-serialized shim for Vec<u8>.
  • ConstBool
    Const getter for a basic type.
  • ConstI8
    Const getter for a basic type.
  • ConstI16
    Const getter for a basic type.
  • ConstI32
    Const getter for a basic type.
  • ConstI64
    Const getter for a basic type.
  • ConstI128
    Const getter for a basic type.
  • ConstU8
    Const getter for a basic type.
  • ConstU16
    Const getter for a basic type.
  • ConstU32
    Const getter for a basic type.
  • ConstU64
    Const getter for a basic type.
  • ConstU128
    Const getter for a basic type.
  • GetDefault
    Implement Get by returning Default for any type that implements Default.
  • H160
    Fixed-size uninterpreted hash type with 20 bytes (160 bits) size.
  • H256
    Fixed-size uninterpreted hash type with 32 bytes (256 bits) size.
  • H512
    Fixed-size uninterpreted hash type with 64 bytes (512 bits) size.
  • KeccakHasher
    Concrete implementation of Hasher using Keccak 256-bit hashes
  • OpaqueMetadata
    Stores the encoded RuntimeMetadata for the native side as opaque type.
  • OpaquePeerId
    Simple blob to hold a PeerId without committing to its format.
  • U256
    Little-endian large integer type 256-bit unsigned integer.
  • U512
    Little-endian large integer type 512-bits unsigned integer.

Enums§

  • LogLevel
    A log level matching the one from log crate.
  • LogLevelFilter
    Log level filter that expresses which log levels should be filtered.
  • Void
    The void type - it cannot exist.

Constants§

  • MAX_POSSIBLE_ALLOCATION
    The maximum number of bytes that can be allocated at one time.

Traits§

  • Get
    A trait for querying a single value from a type.
  • Hasher
    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 an Out associated type with the necessary bounds.
  • TryCollect
    Try and collect into a collection C.
  • TypeId
    Provide a simple 4 byte identifier for a type.
  • TypedGet
    A trait for querying a single value from a type defined in the trait.

Functions§

  • blake2_64
    Do a Blake2 64-bit hash and return result.
  • blake2_128
    Do a Blake2 128-bit hash and return result.
  • blake2_256
    Do a Blake2 256-bit hash and return result.
  • blake2_512
    Do a Blake2 512-bit hash and return result.
  • blake2_512_into
    Do a Blake2 512-bit hash and place result in dest.
  • keccak_256
    Do a keccak 256-bit hash and return result.
  • keccak_512
    Do a keccak 512-bit hash and return result.
  • sha2_256
    Do a sha2 256-bit hash and return result.
  • twox_64
    Do a XX 64-bit hash and return result.
  • twox_64_into
    Do a XX 64-bit hash and place result in dest.
  • twox_128
    Do a XX 128-bit hash and return result.
  • twox_128_into
    Do a XX 128-bit hash and place result in dest.
  • twox_256
    Do a XX 256-bit hash and return result.
  • twox_256_into
    Do a XX 256-bit hash and place result in dest.

Derive Macros§

  • RuntimeDebug

Results

trait
sp_core::crypto::UncheckedInto
The counterpart to UncheckedFrom.
trait method
sp_core::crypto::UncheckedInto::unchecked_into
The counterpart to unchecked_from.
method
sp_core::U256::unchecked_into
method
sp_core::GetDefault::unchecked_into
method
sp_core::ConstBool::unchecked_into
method
sp_core::ConstU8::unchecked_into
method
sp_core::ConstU16::unchecked_into
method
sp_core::ConstU32::unchecked_into
method
sp_core::ConstU64::unchecked_into
method
sp_core::ConstU128::unchecked_into
method
sp_core::ConstI8::unchecked_into
method
sp_core::ConstI16::unchecked_into
method
sp_core::ConstI32::unchecked_into
method
sp_core::ConstI64::unchecked_into
method
sp_core::ConstI128::unchecked_into
method
sp_core::U512::unchecked_into
method
sp_core::H160::unchecked_into
method
sp_core::H256::unchecked_into
method
sp_core::H512::unchecked_into
method
sp_core::Blake2Hasher::unchecked_into
method
sp_core::KeccakHasher::unchecked_into
method
sp_core::Bytes::unchecked_into
method
sp_core::OpaqueMetadata::unchecked_into
method
sp_core::OpaquePeerId::unchecked_into
method
sp_core::LogLevel::unchecked_into
method
sp_core::LogLevelFilter::unchecked_into
method
sp_core::Void::unchecked_into
method
sp_core::bounded_btree_map::BoundedBTreeMap::unchecked_into
method
sp_core::bounded_vec::BoundedVec::unchecked_into
method
sp_core::bounded_vec::BoundedSlice::unchecked_into
method
sp_core::crypto::Ss58AddressFormat::unchecked_into
method
sp_core::crypto::Ss58AddressFormatRegistry::unchecked_into
method
sp_core::crypto::SecretUri::unchecked_into
method
sp_core::crypto::SecretStringError::unchecked_into
method
sp_core::crypto::DeriveError::unchecked_into
method
sp_core::crypto::DeriveJunction::unchecked_into
method
sp_core::crypto::PublicError::unchecked_into
method
sp_core::crypto::AccountId32::unchecked_into
method
sp_core::crypto::KeyTypeId::unchecked_into
method
sp_core::crypto::CryptoTypeId::unchecked_into
method
sp_core::crypto::AddressUri::unchecked_into
method
sp_core::crypto::AddressUriError::unchecked_into
method
sp_core::crypto_bytes::PublicTag::unchecked_into
method
sp_core::crypto_bytes::SignatureTag::unchecked_into
method
sp_core::crypto_bytes::CryptoBytes::unchecked_into
method
sp_core::defer::DeferGuard::unchecked_into
method
sp_core::ecdsa::Pair::unchecked_into
method
sp_core::ed25519::Pair::unchecked_into
method
sp_core::hexdisplay::HexDisplay::unchecked_into
method
sp_core::offchain::LimitedExternalities::unchecked_into
method
sp_core::offchain::StorageKind::unchecked_into
method
sp_core::offchain::HttpRequestId::unchecked_into
method
sp_core::offchain::HttpError::unchecked_into
method
sp_core::offchain::HttpRequestStatus::unchecked_into
method
sp_core::offchain::OpaqueNetworkState::unchecked_into
method
sp_core::offchain::OpaqueMultiaddr::unchecked_into
method
sp_core::offchain::Timestamp::unchecked_into
method
sp_core::offchain::Duration::unchecked_into
method
sp_core::offchain::Capabilities::unchecked_into
method
sp_core::offchain::OffchainWorkerExt::unchecked_into
method
sp_core::offchain::OffchainDbExt::unchecked_into
method
sp_core::offchain::TransactionPoolExt::unchecked_into
method
sp_core::offchain::OffchainOverlayedChange::unchecked_into
method
sp_core::offchain::storage::InMemOffchainStorage::unchecked_into
method
sp_core::offchain::storage::OffchainDb::unchecked_into
method
sp_core::offchain::testing::PendingRequest::unchecked_into
method
sp_core::offchain::testing::TestPersistentOffchainDB::unchecked_into
method
sp_core::offchain::testing::OffchainState::unchecked_into
method
sp_core::offchain::testing::TestOffchainExt::unchecked_into
method
sp_core::offchain::testing::PoolState::unchecked_into
method
sp_core::offchain::testing::TestTransactionPoolExt::unchecked_into
method
sp_core::paired_crypto::Pair::unchecked_into
method
sp_core::sr25519::Pair::unchecked_into
method
sp_core::sr25519::vrf::VrfTranscript::unchecked_into
method
sp_core::sr25519::vrf::VrfSignData::unchecked_into
method
sp_core::sr25519::vrf::VrfSignature::unchecked_into
method
sp_core::sr25519::vrf::VrfPreOutput::unchecked_into
method
sp_core::sr25519::vrf::VrfProof::unchecked_into
method
sp_core::testing::TaskExecutor::unchecked_into
method
sp_core::traits::WrappedRuntimeCode::unchecked_into
method
sp_core::traits::NoneFetchRuntimeCode::unchecked_into
method
sp_core::traits::CallContext::unchecked_into
method
sp_core::traits::RuntimeCode::unchecked_into
method
sp_core::traits::CodeNotFound::unchecked_into
method
sp_core::traits::ReadRuntimeVersionExt::unchecked_into
trait
sp_core::crypto::UncheckedFrom
Similar to From, except that the onus is on the part of …
trait method
sp_core::crypto::UncheckedFrom::unchecked_from
Convert from an instance of T to Self. This is not …
method
sp_core::crypto::AccountId32::unchecked_from
method
sp_core::crypto_bytes::CryptoBytes::unchecked_from
trait method
sp_core::crypto::UncheckedInto::unchecked_into
The counterpart to unchecked_from.
No results :(
Try on DuckDuckGo?

Or try looking in one of these:
  • The Rust Reference for technical details about the language.
  • Rust By Example for expository code examples.
  • The Rust Book for introductions to language features and the language itself.
  • Docs.rs for documentation of crates released on crates.io.