Struct Runtime

Source
pub struct Runtime;

Implementations§

Source§

impl Runtime

Source

pub fn execute_view_function( id: ViewFunctionId, input: Vec<u8>, ) -> Result<Vec<u8>, ViewFunctionDispatchError>

Convenience function for view functions dispatching and execution from the runtime API.

Source§

impl Runtime

Source

pub fn metadata() -> RuntimeMetadataPrefixed

Source

pub fn metadata_at_version(version: u32) -> Option<OpaqueMetadata>

Source

pub fn metadata_versions() -> Vec<u32>

Trait Implementations§

Source§

impl AccountNonceApiV1<Block<Header<u32, BlakeTwo256>, UncheckedExtrinsic<MultiAddress<<<MultiSignature as Verify>::Signer as IdentifyAccount>::AccountId, ()>, RuntimeCall, MultiSignature, (CheckNonZeroSender<Runtime>, CheckSpecVersion<Runtime>, CheckTxVersion<Runtime>, CheckGenesis<Runtime>, CheckMortality<Runtime>, CheckNonce<Runtime>, CheckWeight<Runtime>, ChargeTransactionPayment<Runtime>)>>, <<MultiSignature as Verify>::Signer as IdentifyAccount>::AccountId, u32> for Runtime

Source§

fn account_nonce(account: AccountId) -> Nonce

Get current account nonce of given AccountId.
Source§

impl AsSystemOriginSigner<<Runtime as Config>::AccountId> for RuntimeOrigin

Source§

fn as_system_origin_signer(&self) -> Option<&<Runtime as Config>::AccountId>

Extract a reference of the inner value of the System Origin::Signed variant, if self has that variant.
Source§

impl AuraApiV1<Block<Header<u32, BlakeTwo256>, UncheckedExtrinsic<MultiAddress<<<MultiSignature as Verify>::Signer as IdentifyAccount>::AccountId, ()>, RuntimeCall, MultiSignature, (CheckNonZeroSender<Runtime>, CheckSpecVersion<Runtime>, CheckTxVersion<Runtime>, CheckGenesis<Runtime>, CheckMortality<Runtime>, CheckNonce<Runtime>, CheckWeight<Runtime>, ChargeTransactionPayment<Runtime>)>>, Public> for Runtime

Source§

fn slot_duration() -> SlotDuration

Returns the slot duration for Aura. Read more
Source§

fn authorities() -> Vec<AuraId>

Return the current set of authorities.
Source§

impl BlockBuilderV6<Block<Header<u32, BlakeTwo256>, UncheckedExtrinsic<MultiAddress<<<MultiSignature as Verify>::Signer as IdentifyAccount>::AccountId, ()>, RuntimeCall, MultiSignature, (CheckNonZeroSender<Runtime>, CheckSpecVersion<Runtime>, CheckTxVersion<Runtime>, CheckGenesis<Runtime>, CheckMortality<Runtime>, CheckNonce<Runtime>, CheckWeight<Runtime>, ChargeTransactionPayment<Runtime>)>>> for Runtime

Source§

fn apply_extrinsic( extrinsic: <Block as BlockT>::Extrinsic, ) -> ApplyExtrinsicResult

Apply the given extrinsic. Read more
Source§

fn finalize_block() -> <Block as BlockT>::Header

Finish the current block.
Source§

fn inherent_extrinsics(data: InherentData) -> Vec<<Block as BlockT>::Extrinsic>

Generate inherent extrinsics. The inherent data will vary from chain to chain.
Source§

fn check_inherents(block: Block, data: InherentData) -> CheckInherentsResult

Check that the inherents are valid. The inherent data will vary from chain to chain.
Source§

impl BlockParticipationApiV1<Block<Header<u32, BlakeTwo256>, UncheckedExtrinsic<MultiAddress<<<MultiSignature as Verify>::Signer as IdentifyAccount>::AccountId, ()>, RuntimeCall, MultiSignature, (CheckNonZeroSender<Runtime>, CheckSpecVersion<Runtime>, CheckTxVersion<Runtime>, CheckGenesis<Runtime>, CheckMortality<Runtime>, CheckNonce<Runtime>, CheckWeight<Runtime>, ChargeTransactionPayment<Runtime>)>>, BlockAuthor> for Runtime

Source§

fn should_release_data(slot: Slot) -> Option<Slot>

Returns slot up to which block production data should be released or None.
Source§

fn blocks_produced_up_to_slot(slot: Slot) -> Vec<(Slot, BlockAuthor)>

Returns block authors since last processing up to slot.
Source§

fn target_inherent_id() -> InherentIdentifier

Returns the inherent ID under which block participation data should be provided.
Source§

impl BlockProducerFeesApiV1<Block<Header<u32, BlakeTwo256>, UncheckedExtrinsic<MultiAddress<<<MultiSignature as Verify>::Signer as IdentifyAccount>::AccountId, ()>, RuntimeCall, MultiSignature, (CheckNonZeroSender<Runtime>, CheckSpecVersion<Runtime>, CheckTxVersion<Runtime>, CheckGenesis<Runtime>, CheckMortality<Runtime>, CheckNonce<Runtime>, CheckWeight<Runtime>, ChargeTransactionPayment<Runtime>)>>, <<MultiSignature as Verify>::Signer as IdentifyAccount>::AccountId> for Runtime

Source§

fn get_all_fees() -> Vec<(AccountId, PerTenThousands)>

Retrieves the latests fees of all accounts that have set them.
Source§

impl BlockProducerMetadataApiV1<Block<Header<u32, BlakeTwo256>, UncheckedExtrinsic<MultiAddress<<<MultiSignature as Verify>::Signer as IdentifyAccount>::AccountId, ()>, RuntimeCall, MultiSignature, (CheckNonZeroSender<Runtime>, CheckSpecVersion<Runtime>, CheckTxVersion<Runtime>, CheckGenesis<Runtime>, CheckMortality<Runtime>, CheckNonce<Runtime>, CheckWeight<Runtime>, ChargeTransactionPayment<Runtime>)>>, BlockProducerMetadataType> for Runtime

Source§

fn get_metadata_for( cross_chain_pub_key: &CrossChainPublicKey, ) -> Option<BlockProducerMetadataType>

Retrieves the metadata for a given SPO public key if it exists.
Source§

impl BlockProductionLogApiV1<Block<Header<u32, BlakeTwo256>, UncheckedExtrinsic<MultiAddress<<<MultiSignature as Verify>::Signer as IdentifyAccount>::AccountId, ()>, RuntimeCall, MultiSignature, (CheckNonZeroSender<Runtime>, CheckSpecVersion<Runtime>, CheckTxVersion<Runtime>, CheckGenesis<Runtime>, CheckMortality<Runtime>, CheckNonce<Runtime>, CheckWeight<Runtime>, ChargeTransactionPayment<Runtime>)>>, CommitteeMember<Public, SessionKeys>> for Runtime

Source§

fn get_author( slot: Slot, ) -> Option<CommitteeMember<CrossChainPublic, SessionKeys>>

Function returning the current block’s author. Read more
Source§

impl CallerTrait<<Runtime as Config>::AccountId> for OriginCaller

Source§

fn into_system(self) -> Option<RawOrigin<<Runtime as Config>::AccountId>>

Extract the signer from the message if it is a Signed origin.
Source§

fn as_system_ref(&self) -> Option<&RawOrigin<<Runtime as Config>::AccountId>>

Extract a reference to the system-level RawOrigin if it is that.
§

fn as_signed(&self) -> Option<&AccountId>

Extract the signer from it if a system Signed origin, None otherwise.
§

fn is_root(&self) -> bool

Returns true if self is a system Root origin, None otherwise.
§

fn is_none(&self) -> bool

Returns true if self is a system None origin, None otherwise.
Source§

impl CandidateValidationApiV1<Block<Header<u32, BlakeTwo256>, UncheckedExtrinsic<MultiAddress<<<MultiSignature as Verify>::Signer as IdentifyAccount>::AccountId, ()>, RuntimeCall, MultiSignature, (CheckNonZeroSender<Runtime>, CheckSpecVersion<Runtime>, CheckTxVersion<Runtime>, CheckGenesis<Runtime>, CheckMortality<Runtime>, CheckNonce<Runtime>, CheckWeight<Runtime>, ChargeTransactionPayment<Runtime>)>>> for Runtime

Source§

fn validate_registered_candidate_data( stake_pool_public_key: &StakePoolPublicKey, registration_data: &RegistrationData, ) -> Option<RegistrationDataError>

Should validate data provided by registered candidate, and return RegistrationDataError in case of validation failure. Read more
Source§

fn validate_stake(stake: Option<StakeDelegation>) -> Option<StakeError>

Should validate candidate stake and return StakeError in case of validation failure. Should validate stake exists and is positive.
Source§

fn validate_permissioned_candidate_data( candidate: PermissionedCandidateData, ) -> Option<PermissionedCandidateDataError>

Should validate data provided by permissioned candidate, and return PermissionedCandidateDataError in case of validation failure. Read more
Source§

impl Clone for Runtime

Source§

fn clone(&self) -> Runtime

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Config for Runtime

Source§

type BaseCallFilter = Everything

The basic call filter to use in dispatchable.

Source§

type Block = Block<Header<u32, BlakeTwo256>, UncheckedExtrinsic<MultiAddress<<<MultiSignature as Verify>::Signer as IdentifyAccount>::AccountId, ()>, RuntimeCall, MultiSignature, (CheckNonZeroSender<Runtime>, CheckSpecVersion<Runtime>, CheckTxVersion<Runtime>, CheckGenesis<Runtime>, CheckMortality<Runtime>, CheckNonce<Runtime>, CheckWeight<Runtime>, ChargeTransactionPayment<Runtime>)>>

The block type for the runtime.

Source§

type Nonce = u32

The type for storing how many extrinsics an account has signed.

Source§

type BlockWeights = BlockWeights

Block & extrinsics weights: base values and limits.

Source§

type BlockLength = BlockLength

The maximum length of a block (in bytes).

Source§

type AccountId = <<MultiSignature as Verify>::Signer as IdentifyAccount>::AccountId

The identifier used to distinguish between accounts.

Source§

type RuntimeCall = RuntimeCall

The aggregated dispatch type that is available for extrinsics.

Source§

type Lookup = AccountIdLookup<<<MultiSignature as Verify>::Signer as IdentifyAccount>::AccountId, ()>

The lookup mechanism to get account ID from whatever is passed in dispatchers.

Source§

type Hash = H256

The type for hashing blocks and tries.

Source§

type Hashing = BlakeTwo256

The hashing algorithm used.

Source§

type RuntimeEvent = RuntimeEvent

The ubiquitous event type.

Source§

type RuntimeOrigin = RuntimeOrigin

The ubiquitous origin type.

Source§

type BlockHashCount = BlockHashCount

Maximum number of block number to block hash mappings to keep (oldest pruned first).

Source§

type DbWeight = RocksDbWeight

The weight of database operations that the runtime can invoke.

Source§

type Version = Version

Version of the runtime.

Source§

type PalletInfo = PalletInfo

Converts a module to the index of the module in construct_runtime!.

This type is being generated by construct_runtime!.

Source§

type OnNewAccount = ()

What to do if a new account is created.

Source§

type OnKilledAccount = ()

What to do if an account is fully reaped from the system.

Source§

type AccountData = AccountData<u128>

The data to be stored in an account.

Source§

type SystemWeightInfo = SubstrateWeight<Runtime>

Weight information for the extrinsics of this pallet.

Source§

type SS58Prefix = SS58Prefix

This is used as an identifier of the chain. 42 is the generic substrate prefix.

Source§

type OnSetCode = ()

The set code logic, just the default since we’re not a parachain.

Source§

type ExtensionsWeightInfo = ()

Weight information for the transaction extensions of this pallet.
Source§

type MaxConsumers = ConstU32<16>

The maximum number of consumers allowed on a single account.
Source§

type RuntimeTask = RuntimeTask

The aggregated RuntimeTask type.
Source§

type SingleBlockMigrations = ()

All migrations that should run in the next runtime upgrade. Read more
Source§

type MultiBlockMigrator = ()

The migrator that is used to run Multi-Block-Migrations. Read more
Source§

type PreInherents = ()

A callback that executes in every block directly before all inherents were applied. Read more
Source§

type PostInherents = ()

A callback that executes in every block directly after all inherents were applied. Read more
Source§

type PostTransactions = ()

A callback that executes in every block directly after all transactions were applied. Read more
Source§

impl Config for Runtime

Source§

type RuntimeEvent = RuntimeEvent

Even type used by the runtime
Source§

type TokenTransferHandler = Pallet<Runtime>

Event handler for incoming native token transfers
Source§

type MainChainScriptsOrigin = EnsureRoot<<Runtime as Config>::AccountId>

Origin for governance calls
Source§

type WeightInfo = SubstrateWeight<Runtime>

Weight information for this pallet’s extrinsics
Source§

impl Config for Runtime

Source§

type RuntimeEvent = RuntimeEvent

The ubiquitous event type.
Source§

type MaxValidators = MaxValidators

Maximum amount of validators.
Source§

type AuthorityId = Public

Type identifying authorities.
Source§

type AuthorityKeys = SessionKeys

Type of authority keys.
Source§

type AuthoritySelectionInputs = AuthoritySelectionInputs

Type of input data used by select_authorities to select a committee.
Source§

type ScEpochNumber = ScEpochNumber

Type of the epoch number used by the partner chain.
Source§

type WeightInfo = SubstrateWeight<Runtime>

Weight functions needed for pallet_session_validator_management.
Source§

type CommitteeMember = CommitteeMember<Public, SessionKeys>

Type of committee members returned by select_authorities.
Source§

type MainChainScriptsOrigin = EnsureRoot<<Runtime as Config>::AccountId>

Origin for governance calls
Source§

fn select_authorities( input: AuthoritySelectionInputs, sidechain_epoch: ScEpochNumber, ) -> Option<BoundedVec<Self::CommitteeMember, Self::MaxValidators>>

Should select a committee for sidechain_epoch based on selection inputs input. Should return None if selection was impossible for the given input.
Source§

fn current_epoch_number() -> ScEpochNumber

Should return the current partner chain epoch.
Source§

impl Config for Runtime

Source§

type OnNewEpoch = Pallet<Runtime>

Handler that is called at initialization of the first block of a new Partner Chain epoch
Source§

fn current_slot_number() -> ScSlotNumber

Should return the slot number of the current block
Source§

impl Config for Runtime

Source§

type BlockProducerId = BlockAuthor

ID type that can represent any block producer in the network. This type should be defined by the Partner Chain Depending on its consensus mechanism and possible block producer types.
Source§

type WeightInfo = SubstrateWeight<Runtime>

Weight information on extrinsic in the pallet. For convenience weights in weights module can be used.
Source§

fn current_slot() -> Slot

The slot number of current block.
Source§

impl Config for Runtime

Source§

type WeightInfo = SubstrateWeight<Runtime>

Weight information on extrinsic in the pallet. For convenience weights in weights module can be used.
Source§

type PartnerChainAddress = <<MultiSignature as Verify>::Signer as IdentifyAccount>::AccountId

Type representing a local PC address. This can be a standard Substrate address, an account ID, or some address type specific to the Partner Chain.
Source§

type OnNewAssociation = Pallet<Runtime>

Handler that is called for each new address association. Read more
Source§

fn genesis_utxo() -> UtxoId

Function returning the genesis UTXO of the Partner Chain. This typically should be wired with the genesis_utxo function exposed by pallet_sidechain.
Source§

impl Config for Runtime

Source§

type WeightInfo = ()

Weight information on extrinsic in the pallet. For convenience weights in weights module can be used.
Source§

type HistoricalChangesPerProducer = ConstU16<5>

The maximum number of past changes per one block producer kept in the storage.
Source§

fn current_slot() -> Slot

Should provide the slot number of the current block.
Source§

impl Config for Runtime

Source§

type WeightInfo = SubstrateWeight<Runtime>

Weight information for this pallet’s extrinsics
Source§

type BlockProducerMetadata = BlockProducerMetadataType

Block producer metadata type
Source§

fn genesis_utxo() -> UtxoId

Should return the chain’s genesis UTXO
Source§

impl Config for Runtime

Source§

const TARGET_INHERENT_ID: InherentIdentifier = TestHelperPallet::INHERENT_IDENTIFIER

Inherent ID under which block participation data should be provided. It should be set to the ID used by the pallet that will process participation data for paying out block rewards or other purposes.
Source§

type WeightInfo = SubstrateWeight<Runtime>

Weight info for this pallet’s extrinsics
Source§

type BlockAuthor = BlockAuthor

Type identifying the producer of a block on the Partner Chain
Source§

type DelegatorId = DelegatorKey

Type identifying indirect block production participants on the Partner Chain This can be native stakers on Partner Chain, stakers on the main chain or other.
Source§

fn should_release_data(slot: Slot) -> Option<Slot>

Should return slot up to which block production data should be released or None.
Source§

fn blocks_produced_up_to_slot( slot: Slot, ) -> impl Iterator<Item = (Slot, BlockAuthor)>

Returns block authors since last processing up to slot
Source§

fn discard_blocks_produced_up_to_slot(slot: Slot)

Discards block production data at the source up to slot This should remove exactly the same data as returned by blocks_produced_up_to_slot
Source§

impl Config for Runtime

Source§

type MaxChanges = MaxChanges

Maximum number of changes that can be registered in a single inherent. Read more
Source§

type MaxKeyLength = MaxKeyLength

Maximum length of the key in the Governed Map in bytes. Read more
Source§

type MaxValueLength = MaxValueLength

Maximum length of data stored under a single key in the Governed Map Read more
Source§

type WeightInfo = SubstrateWeight<Runtime>

Weight functions for the pallet’s extrinsics
Source§

type OnGovernedMappingChange = Pallet<Runtime>

Handler called for each change in the governed mappings. Read more
Source§

type MainChainScriptsOrigin = EnsureRoot<<Runtime as Config>::AccountId>

Origin for governance calls
Source§

impl Config for Runtime

Source§

type AuthorityId = Public

The identifier type for an authority.
Source§

type DisabledValidators = ()

A way to check whether a given validator is disabled and should not be authoring blocks. Blocks authored by a disabled validator will lead to a panic as part of this module’s initialization.
Source§

type MaxAuthorities = MaxValidators

The maximum number of authorities that the pallet can hold.
Source§

type AllowMultipleBlocksPerSlot = ConstBool<false>

Whether to allow block authors to create multiple blocks per slot. Read more
Source§

type SlotDuration = ConstU64<SLOT_DURATION>

The slot duration Aura should run with, expressed in milliseconds. The effective value of this type should not change while the chain is running. Read more
Source§

impl Config for Runtime
where Runtime: Config,

Source§

type RuntimeEvent = <Runtime as Config>::RuntimeEvent

The overarching event type.
Source§

type ValidatorId = <Runtime as Config>::ValidatorId

A stable ID for a validator.
Source§

type ValidatorIdOf = PalletSessionStubImpls

A conversion from account ID to validator ID. Read more
Source§

type ShouldEndSession = PalletSessionStubImpls

Indicator for when to end the session.
Source§

type NextSessionRotation = ()

Something that can predict the next session rotation. This should typically come from the same logical unit that provides [ShouldEndSession], yet, it gives a best effort estimate. It is helpful to implement [EstimateNextNewSession].
Source§

type SessionManager = PalletSessionStubImpls

Handler for managing new session.
Source§

type SessionHandler = <Runtime as Config>::SessionHandler

Handler when a session has changed.
Source§

type Keys = <Runtime as Config>::Keys

The keys.
Source§

type DisablingStrategy = ()

DisablingStragegy controls how validators are disabled
Source§

type WeightInfo = ()

Weight information for extrinsics in this pallet.
Source§

impl Config for Runtime

Source§

type RuntimeEvent = RuntimeEvent

The event type of this module.
Source§

type WeightInfo = ()

Weights for this pallet.
Source§

type MaxAuthorities = MaxValidators

Max Authorities in use
Source§

type MaxNominators = ConstU32<0>

The maximum number of nominators for each validator.
Source§

type MaxSetIdSessionEntries = ConstU64<0>

The maximum number of entries to keep in the set id to session index mapping. Read more
Source§

type KeyOwnerProof = Void

The proof of key ownership, used for validating equivocation reports The proof include the session index and validator count of the session at which the equivocation occurred.
Source§

type EquivocationReportSystem = ()

The equivocation handling subsystem, defines methods to check/report an offence and for submitting a transaction to report an equivocation (from an offchain context).
Source§

impl Config for Runtime

Source§

type Moment = u64

A timestamp: milliseconds since the unix epoch.

Source§

type OnTimestampSet = Pallet<Runtime>

Something which can be notified (e.g. another pallet) when the timestamp is set. Read more
Source§

type MinimumPeriod = ConstU64<{ SLOT_DURATION / 2 }>

The minimum period between blocks. Read more
Source§

type WeightInfo = SubstrateWeight<Runtime>

Weight information for extrinsics in this pallet.
Source§

impl Config for Runtime

Source§

type Balance = u128

The type for recording an account’s balance.

Source§

type RuntimeEvent = RuntimeEvent

The ubiquitous event type.

Source§

type MaxLocks = ConstU32<50>

The maximum number of locks that should exist on an account. Not strictly enforced, but used for weight estimation. Read more
Source§

type MaxReserves = ()

The maximum number of named reserves that can exist on an account. Read more
Source§

type ReserveIdentifier = [u8; 8]

The ID type for reserves. Read more
Source§

type DustRemoval = ()

Handler for the unbalanced reduction when removing a dust account.
Source§

type ExistentialDeposit = ConstU128<EXISTENTIAL_DEPOSIT>

The minimum amount required to keep an account open. MUST BE GREATER THAN ZERO! Read more
Source§

type AccountStore = Pallet<Runtime>

The means of storing the balances of an account.
Source§

type WeightInfo = SubstrateWeight<Runtime>

Weight information for extrinsics in this pallet.
Source§

type FreezeIdentifier = ()

The ID type for freezes.
Source§

type MaxFreezes = ()

The maximum number of individual freeze locks that can exist on an account at any time.
Source§

type RuntimeHoldReason = ()

The overarching hold reason.
Source§

type RuntimeFreezeReason = RuntimeFreezeReason

The overarching freeze reason.
Source§

type DoneSlashHandler = ()

Allows callbacks to other pallets so they can update their bookkeeping when a slash occurs.
Source§

impl Config for Runtime

Source§

type RuntimeEvent = RuntimeEvent

The overarching event type.
Source§

type OnChargeTransaction = FungibleAdapter<Pallet<Runtime>, ()>

Handler for withdrawing, refunding and depositing the transaction fee. Transaction fees are withdrawn before the transaction is executed. After the transaction was executed the transaction weight can be adjusted, depending on the used resources by the transaction. If the transaction weight is lower than expected, parts of the transaction fee might be refunded. In the end the fees can be deposited.
Source§

type OperationalFeeMultiplier = ConstU8<5>

A fee multiplier for Operational extrinsics to compute “virtual tip” to boost their priority Read more
Source§

type WeightToFee = IdentityFee<u128>

Convert a weight value into a deductible fee based on the currency type.
Source§

type LengthToFee = IdentityFee<u128>

Convert a length value into a deductible fee based on the currency type.
Source§

type FeeMultiplierUpdate = ConstFeeMultiplier<FeeMultiplier>

Update the multiplier of the next block, based on the previous block’s weight.
Source§

type WeightInfo = SubstrateWeight<Runtime>

The weight information of this pallet.
Source§

impl Config for Runtime

Source§

type RuntimeEvent = RuntimeEvent

The overarching event type.
Source§

type RuntimeCall = RuntimeCall

A sudo-able call.
Source§

type WeightInfo = SubstrateWeight<Runtime>

Type representing the weight of this pallet
Source§

impl Config for Runtime

Source§

type RuntimeEvent = RuntimeEvent

The overarching event type.
Source§

type ValidatorId = <Runtime as Config>::AccountId

A stable ID for a validator.
Source§

type ShouldEndSession = ValidatorManagementSessionManager<Runtime>

Indicator for when to end the session.
Source§

type NextSessionRotation = ()

Something that can predict the next session rotation. This should typically come from the same logical unit that provides ShouldEndSession, yet, it gives a best effort estimate. It is helpful to implement [EstimateNextNewSession].
Source§

type SessionManager = ValidatorManagementSessionManager<Runtime>

Handler for managing new session.
Source§

type SessionHandler = <SessionKeys as OpaqueKeys>::KeyTypeIdProviders

Handler when a session has changed.
Source§

type Keys = SessionKeys

The keys.
Source§

impl CoreV5<Block<Header<u32, BlakeTwo256>, UncheckedExtrinsic<MultiAddress<<<MultiSignature as Verify>::Signer as IdentifyAccount>::AccountId, ()>, RuntimeCall, MultiSignature, (CheckNonZeroSender<Runtime>, CheckSpecVersion<Runtime>, CheckTxVersion<Runtime>, CheckGenesis<Runtime>, CheckMortality<Runtime>, CheckNonce<Runtime>, CheckWeight<Runtime>, ChargeTransactionPayment<Runtime>)>>> for Runtime

Source§

fn version() -> RuntimeVersion

Returns the version of the runtime.
Source§

fn execute_block(block: Block)

Execute the given block.
Source§

fn initialize_block( header: &<Block as BlockT>::Header, ) -> ExtrinsicInclusionMode

Initialize a block with the given header and return the runtime executive mode.
Source§

impl Debug for Runtime

Source§

fn fmt(&self, fmt: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl EnsureInherentsAreFirst<<Runtime as Config>::Block> for Runtime

Source§

fn ensure_inherents_are_first( block: &<Runtime as Config>::Block, ) -> Result<u32, u32>

Ensure the position of inherent is correct, i.e. they are before non-inherents. Read more
Source§

impl GenesisBuilderV1<Block<Header<u32, BlakeTwo256>, UncheckedExtrinsic<MultiAddress<<<MultiSignature as Verify>::Signer as IdentifyAccount>::AccountId, ()>, RuntimeCall, MultiSignature, (CheckNonZeroSender<Runtime>, CheckSpecVersion<Runtime>, CheckTxVersion<Runtime>, CheckGenesis<Runtime>, CheckMortality<Runtime>, CheckNonce<Runtime>, CheckWeight<Runtime>, ChargeTransactionPayment<Runtime>)>>> for Runtime

Source§

fn build_state(config: Vec<u8>) -> Result

Build RuntimeGenesisConfig from a JSON blob not using any defaults and store it in the storage. Read more
Source§

fn get_preset(id: &Option<PresetId>) -> Option<Vec<u8>>

Returns a JSON blob representation of the built-in RuntimeGenesisConfig identified by id. Read more
Source§

fn preset_names() -> Vec<PresetId>

Returns a list of identifiers for available builtin RuntimeGenesisConfig presets. Read more
Source§

impl GetGenesisUtxoV1<Block<Header<u32, BlakeTwo256>, UncheckedExtrinsic<MultiAddress<<<MultiSignature as Verify>::Signer as IdentifyAccount>::AccountId, ()>, RuntimeCall, MultiSignature, (CheckNonZeroSender<Runtime>, CheckSpecVersion<Runtime>, CheckTxVersion<Runtime>, CheckGenesis<Runtime>, CheckMortality<Runtime>, CheckNonce<Runtime>, CheckWeight<Runtime>, ChargeTransactionPayment<Runtime>)>>> for Runtime

Source§

fn genesis_utxo() -> UtxoId

Returns the Partner Chain’s genesis UTXO
Source§

impl GetRuntimeBlockType for Runtime

Source§

type RuntimeBlock = <Runtime as Config>::Block

The RuntimeBlock type.
Source§

impl GetSidechainStatusV1<Block<Header<u32, BlakeTwo256>, UncheckedExtrinsic<MultiAddress<<<MultiSignature as Verify>::Signer as IdentifyAccount>::AccountId, ()>, RuntimeCall, MultiSignature, (CheckNonZeroSender<Runtime>, CheckSpecVersion<Runtime>, CheckTxVersion<Runtime>, CheckGenesis<Runtime>, CheckMortality<Runtime>, CheckNonce<Runtime>, CheckWeight<Runtime>, ChargeTransactionPayment<Runtime>)>>> for Runtime

Source§

fn get_sidechain_status() -> SidechainStatus

👎Deprecated since 1.7.0: Code that needs this data should define its own runtime API instead.
Returns current Partner Chain slot and epoch
Source§

impl GovernedMapIDPApiV1<Block<Header<u32, BlakeTwo256>, UncheckedExtrinsic<MultiAddress<<<MultiSignature as Verify>::Signer as IdentifyAccount>::AccountId, ()>, RuntimeCall, MultiSignature, (CheckNonZeroSender<Runtime>, CheckSpecVersion<Runtime>, CheckTxVersion<Runtime>, CheckGenesis<Runtime>, CheckMortality<Runtime>, CheckNonce<Runtime>, CheckWeight<Runtime>, ChargeTransactionPayment<Runtime>)>>> for Runtime

Source§

fn is_initialized() -> bool

Returns initialization state of the pallet
Source§

fn get_current_state() -> BTreeMap<String, ByteString>

Returns all mappings currently stored in the pallet
Source§

fn get_main_chain_scripts() -> Option<MainChainScriptsV1>

Returns the main chain scripts currently set in the pallet or None otherwise
Source§

fn get_pallet_version() -> u32

Returns the current version of the pallet, 1-based.
Source§

impl GrandpaApiV3<Block<Header<u32, BlakeTwo256>, UncheckedExtrinsic<MultiAddress<<<MultiSignature as Verify>::Signer as IdentifyAccount>::AccountId, ()>, RuntimeCall, MultiSignature, (CheckNonZeroSender<Runtime>, CheckSpecVersion<Runtime>, CheckTxVersion<Runtime>, CheckGenesis<Runtime>, CheckMortality<Runtime>, CheckNonce<Runtime>, CheckWeight<Runtime>, ChargeTransactionPayment<Runtime>)>>> for Runtime

Source§

fn grandpa_authorities() -> AuthorityList

Get the current GRANDPA authorities and weights. This should not change except for when changes are scheduled and the corresponding delay has passed. Read more
Source§

fn current_set_id() -> SetId

Get current GRANDPA authority set id.
Source§

fn submit_report_equivocation_unsigned_extrinsic( _equivocation_proof: EquivocationProof<<Block as BlockT>::Hash, NumberFor<Block>>, _key_owner_proof: OpaqueKeyOwnershipProof, ) -> Option<()>

Submits an unsigned extrinsic to report an equivocation. The caller must provide the equivocation proof and a key ownership proof (should be obtained using generate_key_ownership_proof). The extrinsic will be unsigned and should only be accepted for local authorship (not to be broadcast to the network). This method returns None when creation of the extrinsic fails, e.g. if equivocation reporting is disabled for the given runtime (i.e. this method is hardcoded to return None). Only useful in an offchain context.
Source§

fn generate_key_ownership_proof( _set_id: SetId, _authority_id: GrandpaId, ) -> Option<OpaqueKeyOwnershipProof>

Generates a proof of key ownership for the given authority in the given set. An example usage of this module is coupled with the session historical module to prove that a given authority key is tied to a given staking identity during a specific session. Proofs of key ownership are necessary for submitting equivocation reports. NOTE: even though the API takes a set_id as parameter the current implementations ignore this parameter and instead rely on this method being called at the correct block height, i.e. any point at which the given set id is live on-chain. Future implementations will instead use indexed data through an offchain worker, not requiring older states to be available.
Source§

impl IsInherent<<<Runtime as Config>::Block as Block>::Extrinsic> for Runtime

Source§

fn is_inherent(ext: &<<Runtime as Config>::Block as Block>::Extrinsic) -> bool

Whether this extrinsic is an inherent.
Source§

impl MetadataV2<Block<Header<u32, BlakeTwo256>, UncheckedExtrinsic<MultiAddress<<<MultiSignature as Verify>::Signer as IdentifyAccount>::AccountId, ()>, RuntimeCall, MultiSignature, (CheckNonZeroSender<Runtime>, CheckSpecVersion<Runtime>, CheckTxVersion<Runtime>, CheckGenesis<Runtime>, CheckMortality<Runtime>, CheckNonce<Runtime>, CheckWeight<Runtime>, ChargeTransactionPayment<Runtime>)>>> for Runtime

Source§

fn metadata() -> OpaqueMetadata

Returns the metadata of a runtime.
Source§

fn metadata_at_version(version: u32) -> Option<OpaqueMetadata>

Returns the metadata at a given version. Read more
Source§

fn metadata_versions() -> Vec<u32>

Returns the supported metadata versions. Read more
Source§

impl NativeTokenManagementApiV1<Block<Header<u32, BlakeTwo256>, UncheckedExtrinsic<MultiAddress<<<MultiSignature as Verify>::Signer as IdentifyAccount>::AccountId, ()>, RuntimeCall, MultiSignature, (CheckNonZeroSender<Runtime>, CheckSpecVersion<Runtime>, CheckTxVersion<Runtime>, CheckGenesis<Runtime>, CheckMortality<Runtime>, CheckNonce<Runtime>, CheckWeight<Runtime>, ChargeTransactionPayment<Runtime>)>>> for Runtime

Source§

fn get_main_chain_scripts() -> Option<MainChainScripts>

Returns the current main chain scripts configured in the pallet or None if they are not set.
Source§

fn initialized() -> bool

Gets current initializaion status and set it to true afterwards. This check is used to determine whether historical data from the beginning of main chain should be queried.
Source§

impl OffchainWorkerApiV2<Block<Header<u32, BlakeTwo256>, UncheckedExtrinsic<MultiAddress<<<MultiSignature as Verify>::Signer as IdentifyAccount>::AccountId, ()>, RuntimeCall, MultiSignature, (CheckNonZeroSender<Runtime>, CheckSpecVersion<Runtime>, CheckTxVersion<Runtime>, CheckGenesis<Runtime>, CheckMortality<Runtime>, CheckNonce<Runtime>, CheckWeight<Runtime>, ChargeTransactionPayment<Runtime>)>>> for Runtime

Source§

fn offchain_worker(header: &<Block as BlockT>::Header)

Starts the off-chain task for given block header.
Source§

impl PartialEq for Runtime

Source§

fn eq(&self, other: &Runtime) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl SessionKeysV1<Block<Header<u32, BlakeTwo256>, UncheckedExtrinsic<MultiAddress<<<MultiSignature as Verify>::Signer as IdentifyAccount>::AccountId, ()>, RuntimeCall, MultiSignature, (CheckNonZeroSender<Runtime>, CheckSpecVersion<Runtime>, CheckTxVersion<Runtime>, CheckGenesis<Runtime>, CheckMortality<Runtime>, CheckNonce<Runtime>, CheckWeight<Runtime>, ChargeTransactionPayment<Runtime>)>>> for Runtime

Source§

fn generate_session_keys(seed: Option<Vec<u8>>) -> Vec<u8>

Generate a set of session keys with optionally using the given seed. The keys should be stored within the keystore exposed via runtime externalities. Read more
Source§

fn decode_session_keys(encoded: Vec<u8>) -> Option<Vec<(Vec<u8>, KeyTypeId)>>

Decode the given public session keys. Read more
Source§

impl SessionValidatorManagementApiV2<Block<Header<u32, BlakeTwo256>, UncheckedExtrinsic<MultiAddress<<<MultiSignature as Verify>::Signer as IdentifyAccount>::AccountId, ()>, RuntimeCall, MultiSignature, (CheckNonZeroSender<Runtime>, CheckSpecVersion<Runtime>, CheckTxVersion<Runtime>, CheckGenesis<Runtime>, CheckMortality<Runtime>, CheckNonce<Runtime>, CheckWeight<Runtime>, ChargeTransactionPayment<Runtime>)>>, CommitteeMember<Public, SessionKeys>, AuthoritySelectionInputs, ScEpochNumber> for Runtime

Source§

impl SlotApiV1<Block<Header<u32, BlakeTwo256>, UncheckedExtrinsic<MultiAddress<<<MultiSignature as Verify>::Signer as IdentifyAccount>::AccountId, ()>, RuntimeCall, MultiSignature, (CheckNonZeroSender<Runtime>, CheckSpecVersion<Runtime>, CheckTxVersion<Runtime>, CheckGenesis<Runtime>, CheckMortality<Runtime>, CheckNonce<Runtime>, CheckWeight<Runtime>, ChargeTransactionPayment<Runtime>)>>> for Runtime

Source§

fn slot_config() -> ScSlotConfig

Returns the current slot configuration
Source§

impl TaggedTransactionQueueV3<Block<Header<u32, BlakeTwo256>, UncheckedExtrinsic<MultiAddress<<<MultiSignature as Verify>::Signer as IdentifyAccount>::AccountId, ()>, RuntimeCall, MultiSignature, (CheckNonZeroSender<Runtime>, CheckSpecVersion<Runtime>, CheckTxVersion<Runtime>, CheckGenesis<Runtime>, CheckMortality<Runtime>, CheckNonce<Runtime>, CheckWeight<Runtime>, ChargeTransactionPayment<Runtime>)>>> for Runtime

Source§

fn validate_transaction( source: TransactionSource, tx: <Block as BlockT>::Extrinsic, block_hash: <Block as BlockT>::Hash, ) -> TransactionValidity

Validate the transaction. Read more
Source§

impl TransactionPaymentApiV4<Block<Header<u32, BlakeTwo256>, UncheckedExtrinsic<MultiAddress<<<MultiSignature as Verify>::Signer as IdentifyAccount>::AccountId, ()>, RuntimeCall, MultiSignature, (CheckNonZeroSender<Runtime>, CheckSpecVersion<Runtime>, CheckTxVersion<Runtime>, CheckGenesis<Runtime>, CheckMortality<Runtime>, CheckNonce<Runtime>, CheckWeight<Runtime>, ChargeTransactionPayment<Runtime>)>>, u128> for Runtime

Source§

fn query_info( uxt: <Block as BlockT>::Extrinsic, len: u32, ) -> RuntimeDispatchInfo<Balance>

Source§

fn query_fee_details( uxt: <Block as BlockT>::Extrinsic, len: u32, ) -> FeeDetails<Balance>

Source§

fn query_weight_to_fee(weight: Weight) -> Balance

Source§

fn query_length_to_fee(length: u32) -> Balance

Source§

impl TransactionPaymentCallApiV3<Block<Header<u32, BlakeTwo256>, UncheckedExtrinsic<MultiAddress<<<MultiSignature as Verify>::Signer as IdentifyAccount>::AccountId, ()>, RuntimeCall, MultiSignature, (CheckNonZeroSender<Runtime>, CheckSpecVersion<Runtime>, CheckTxVersion<Runtime>, CheckGenesis<Runtime>, CheckMortality<Runtime>, CheckNonce<Runtime>, CheckWeight<Runtime>, ChargeTransactionPayment<Runtime>)>>, u128, RuntimeCall> for Runtime

Source§

fn query_call_info(call: RuntimeCall, len: u32) -> RuntimeDispatchInfo<Balance>

Query information of a dispatch class, weight, and fee of a given encoded Call.
Source§

fn query_call_fee_details(call: RuntimeCall, len: u32) -> FeeDetails<Balance>

Query fee details of a given encoded Call.
Source§

fn query_weight_to_fee(weight: Weight) -> Balance

Query the output of the current WeightToFee given some input.
Source§

fn query_length_to_fee(length: u32) -> Balance

Query the output of the current LengthToFee given some input.
Source§

impl TypeInfo for Runtime

Source§

type Identity = Runtime

The type identifying for which type info is provided. Read more
Source§

fn type_info() -> Type

Returns the static type identifier for Self.
Source§

impl ValidateUnsigned for Runtime

Source§

type Call = RuntimeCall

The call to validate
Source§

fn pre_dispatch(call: &Self::Call) -> Result<(), TransactionValidityError>

Validate the call right before dispatch. Read more
Source§

fn validate_unsigned( source: TransactionSource, call: &Self::Call, ) -> TransactionValidity

Return the validity of the call Read more
Source§

impl Copy for Runtime

Source§

impl Eq for Runtime

Source§

impl StructuralPartialEq for Runtime

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> CheckedConversion for T

§

fn checked_from<T>(t: T) -> Option<Self>
where Self: TryFrom<T>,

Convert from a value of T into an equivalent instance of Option<Self>. Read more
§

fn checked_into<T>(self) -> Option<T>
where Self: TryInto<T>,

Consume self to return Some equivalent value of Option<T>. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
§

impl<T, U> IntoKey<U> for T
where U: FromKey<T>,

§

fn into_key(self) -> U

§

impl<Src, Dest> IntoTuple<Dest> for Src
where Dest: FromTuple<Src>,

§

fn into_tuple(self) -> Dest

§

impl<T> IsType<T> for T

§

fn from_ref(t: &T) -> &T

Cast reference.
§

fn into_ref(&self) -> &T

Cast reference.
§

fn from_mut(t: &mut T) -> &mut T

Cast mutable reference.
§

fn into_mut(&mut self) -> &mut T

Cast mutable reference.
§

impl<T, Outer> IsWrappedBy<Outer> for T
where Outer: AsRef<T> + AsMut<T> + From<T>, T: From<Outer>,

§

fn from_ref(outer: &Outer) -> &T

Get a reference to the inner from the outer.

§

fn from_mut(outer: &mut Outer) -> &mut T

Get a mutable reference to the inner from the outer.

§

impl<T> Paint for T
where T: ?Sized,

§

fn fg(&self, value: Color) -> Painted<&T>

Returns a styled value derived from self with the foreground set to value.

This method should be used rarely. Instead, prefer to use color-specific builder methods like red() and green(), which have the same functionality but are pithier.

§Example

Set foreground color to white using fg():

use yansi::{Paint, Color};

painted.fg(Color::White);

Set foreground color to white using white().

use yansi::Paint;

painted.white();
§

fn primary(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: Primary].

§Example
println!("{}", value.primary());
§

fn fixed(&self, color: u8) -> Painted<&T>

Returns self with the fg() set to [Color :: Fixed].

§Example
println!("{}", value.fixed(color));
§

fn rgb(&self, r: u8, g: u8, b: u8) -> Painted<&T>

Returns self with the fg() set to [Color :: Rgb].

§Example
println!("{}", value.rgb(r, g, b));
§

fn black(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: Black].

§Example
println!("{}", value.black());
§

fn red(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: Red].

§Example
println!("{}", value.red());
§

fn green(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: Green].

§Example
println!("{}", value.green());
§

fn yellow(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: Yellow].

§Example
println!("{}", value.yellow());
§

fn blue(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: Blue].

§Example
println!("{}", value.blue());
§

fn magenta(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: Magenta].

§Example
println!("{}", value.magenta());
§

fn cyan(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: Cyan].

§Example
println!("{}", value.cyan());
§

fn white(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: White].

§Example
println!("{}", value.white());
§

fn bright_black(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: BrightBlack].

§Example
println!("{}", value.bright_black());
§

fn bright_red(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: BrightRed].

§Example
println!("{}", value.bright_red());
§

fn bright_green(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: BrightGreen].

§Example
println!("{}", value.bright_green());
§

fn bright_yellow(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: BrightYellow].

§Example
println!("{}", value.bright_yellow());
§

fn bright_blue(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: BrightBlue].

§Example
println!("{}", value.bright_blue());
§

fn bright_magenta(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: BrightMagenta].

§Example
println!("{}", value.bright_magenta());
§

fn bright_cyan(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: BrightCyan].

§Example
println!("{}", value.bright_cyan());
§

fn bright_white(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: BrightWhite].

§Example
println!("{}", value.bright_white());
§

fn bg(&self, value: Color) -> Painted<&T>

Returns a styled value derived from self with the background set to value.

This method should be used rarely. Instead, prefer to use color-specific builder methods like on_red() and on_green(), which have the same functionality but are pithier.

§Example

Set background color to red using fg():

use yansi::{Paint, Color};

painted.bg(Color::Red);

Set background color to red using on_red().

use yansi::Paint;

painted.on_red();
§

fn on_primary(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: Primary].

§Example
println!("{}", value.on_primary());
§

fn on_fixed(&self, color: u8) -> Painted<&T>

Returns self with the bg() set to [Color :: Fixed].

§Example
println!("{}", value.on_fixed(color));
§

fn on_rgb(&self, r: u8, g: u8, b: u8) -> Painted<&T>

Returns self with the bg() set to [Color :: Rgb].

§Example
println!("{}", value.on_rgb(r, g, b));
§

fn on_black(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: Black].

§Example
println!("{}", value.on_black());
§

fn on_red(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: Red].

§Example
println!("{}", value.on_red());
§

fn on_green(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: Green].

§Example
println!("{}", value.on_green());
§

fn on_yellow(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: Yellow].

§Example
println!("{}", value.on_yellow());
§

fn on_blue(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: Blue].

§Example
println!("{}", value.on_blue());
§

fn on_magenta(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: Magenta].

§Example
println!("{}", value.on_magenta());
§

fn on_cyan(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: Cyan].

§Example
println!("{}", value.on_cyan());
§

fn on_white(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: White].

§Example
println!("{}", value.on_white());
§

fn on_bright_black(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: BrightBlack].

§Example
println!("{}", value.on_bright_black());
§

fn on_bright_red(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: BrightRed].

§Example
println!("{}", value.on_bright_red());
§

fn on_bright_green(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: BrightGreen].

§Example
println!("{}", value.on_bright_green());
§

fn on_bright_yellow(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: BrightYellow].

§Example
println!("{}", value.on_bright_yellow());
§

fn on_bright_blue(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: BrightBlue].

§Example
println!("{}", value.on_bright_blue());
§

fn on_bright_magenta(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: BrightMagenta].

§Example
println!("{}", value.on_bright_magenta());
§

fn on_bright_cyan(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: BrightCyan].

§Example
println!("{}", value.on_bright_cyan());
§

fn on_bright_white(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: BrightWhite].

§Example
println!("{}", value.on_bright_white());
§

fn attr(&self, value: Attribute) -> Painted<&T>

Enables the styling [Attribute] value.

This method should be used rarely. Instead, prefer to use attribute-specific builder methods like bold() and underline(), which have the same functionality but are pithier.

§Example

Make text bold using attr():

use yansi::{Paint, Attribute};

painted.attr(Attribute::Bold);

Make text bold using using bold().

use yansi::Paint;

painted.bold();
§

fn bold(&self) -> Painted<&T>

Returns self with the attr() set to [Attribute :: Bold].

§Example
println!("{}", value.bold());
§

fn dim(&self) -> Painted<&T>

Returns self with the attr() set to [Attribute :: Dim].

§Example
println!("{}", value.dim());
§

fn italic(&self) -> Painted<&T>

Returns self with the attr() set to [Attribute :: Italic].

§Example
println!("{}", value.italic());
§

fn underline(&self) -> Painted<&T>

Returns self with the attr() set to [Attribute :: Underline].

§Example
println!("{}", value.underline());

Returns self with the attr() set to [Attribute :: Blink].

§Example
println!("{}", value.blink());

Returns self with the attr() set to [Attribute :: RapidBlink].

§Example
println!("{}", value.rapid_blink());
§

fn invert(&self) -> Painted<&T>

Returns self with the attr() set to [Attribute :: Invert].

§Example
println!("{}", value.invert());
§

fn conceal(&self) -> Painted<&T>

Returns self with the attr() set to [Attribute :: Conceal].

§Example
println!("{}", value.conceal());
§

fn strike(&self) -> Painted<&T>

Returns self with the attr() set to [Attribute :: Strike].

§Example
println!("{}", value.strike());
§

fn quirk(&self, value: Quirk) -> Painted<&T>

Enables the yansi [Quirk] value.

This method should be used rarely. Instead, prefer to use quirk-specific builder methods like mask() and wrap(), which have the same functionality but are pithier.

§Example

Enable wrapping using .quirk():

use yansi::{Paint, Quirk};

painted.quirk(Quirk::Wrap);

Enable wrapping using wrap().

use yansi::Paint;

painted.wrap();
§

fn mask(&self) -> Painted<&T>

Returns self with the quirk() set to [Quirk :: Mask].

§Example
println!("{}", value.mask());
§

fn wrap(&self) -> Painted<&T>

Returns self with the quirk() set to [Quirk :: Wrap].

§Example
println!("{}", value.wrap());
§

fn linger(&self) -> Painted<&T>

Returns self with the quirk() set to [Quirk :: Linger].

§Example
println!("{}", value.linger());
§

fn clear(&self) -> Painted<&T>

👎Deprecated since 1.0.1: renamed to resetting() due to conflicts with Vec::clear(). The clear() method will be removed in a future release.

Returns self with the quirk() set to [Quirk :: Clear].

§Example
println!("{}", value.clear());
§

fn resetting(&self) -> Painted<&T>

Returns self with the quirk() set to [Quirk :: Resetting].

§Example
println!("{}", value.resetting());
§

fn bright(&self) -> Painted<&T>

Returns self with the quirk() set to [Quirk :: Bright].

§Example
println!("{}", value.bright());
§

fn on_bright(&self) -> Painted<&T>

Returns self with the quirk() set to [Quirk :: OnBright].

§Example
println!("{}", value.on_bright());
§

fn whenever(&self, value: Condition) -> Painted<&T>

Conditionally enable styling based on whether the [Condition] value applies. Replaces any previous condition.

See the crate level docs for more details.

§Example

Enable styling painted only when both stdout and stderr are TTYs:

use yansi::{Paint, Condition};

painted.red().on_yellow().whenever(Condition::STDOUTERR_ARE_TTY);
§

fn new(self) -> Painted<Self>
where Self: Sized,

Create a new [Painted] with a default [Style]. Read more
§

fn paint<S>(&self, style: S) -> Painted<&Self>
where S: Into<Style>,

Apply a style wholesale to self. Any previous style is replaced. Read more
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
§

impl<T> SaturatedConversion for T

§

fn saturated_from<T>(t: T) -> Self
where Self: UniqueSaturatedFrom<T>,

Convert from a value of T into an equivalent instance of Self. Read more
§

fn saturated_into<T>(self) -> T
where Self: UniqueSaturatedInto<T>,

Consume self to return an equivalent value of T. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T, U> TryIntoKey<U> for T
where U: TryFromKey<T>,

§

type Error = <U as TryFromKey<T>>::Error

§

fn try_into_key(self) -> Result<U, <U as TryFromKey<T>>::Error>

§

impl<S, T> UncheckedInto<T> for S
where T: UncheckedFrom<S>,

§

fn unchecked_into(self) -> T

The counterpart to unchecked_from.
§

impl<T, S> UniqueSaturatedInto<T> for S
where T: Bounded, S: TryInto<T>,

§

fn unique_saturated_into(self) -> T

Consume self to return an equivalent value of T.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

impl<T> ErasedDestructor for T
where T: 'static,

§

impl<T> JsonSchemaMaybe for T

§

impl<T> MaybeDebug for T
where T: Debug,

§

impl<T> MaybeRefUnwindSafe for T
where T: RefUnwindSafe,

§

impl<T> Member for T
where T: Send + Sync + Debug + Eq + PartialEq + Clone + 'static,

§

impl<T> StaticTypeInfo for T
where T: TypeInfo + 'static,