Struct node_runtime::Runtime[][src]

pub struct Runtime;

Implementations

Trait Implementations

Get current account nonce of given AccountId.

Retrieve authority identifiers of the current and next authority set.

Return the genesis configuration for BABE. The configuration is only read on genesis.

Returns the slot that started the current epoch.

Returns information regarding the current epoch.

Returns information regarding the next epoch (which was already previously announced). Read more

Generates a proof of key ownership for the given authority in the current epoch. 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 slot as parameter the current implementations ignores this parameter and instead relies on this method being called at the correct block height, i.e. any point at which the epoch for the given slot is live on-chain. Future implementations will instead use indexed data through an offchain worker, not requiring older states to be available. Read more

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. Read more

Get the benchmark metadata available for this runtime. Read more

Dispatch the given benchmark.

Apply the given extrinsic. Read more

Finish the current block.

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

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

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

The basic call filter to use in Origin. All origins are built with this filter as base, except Root. Read more

Block & extrinsics weights: base values and limits.

The maximum length of a block (in bytes).

The weight of runtime database operations the runtime can invoke.

The Origin type used by dispatchable calls.

The aggregated Call type.

Account index (aka nonce) type. This stores the number of previous transactions associated with a sender account. Read more

The block number type used by the runtime.

The output of the Hashing function.

The hashing system (algorithm) being used in the runtime (e.g. Blake2).

The user account identifier type for the runtime.

Converting trait to take a source type and convert to AccountId. Read more

The block header.

The aggregated event type of the runtime.

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

Get the chain’s current version.

Provides information about the pallet setup in the runtime. Read more

Data to be associated with an account (other than nonce/transaction counter, which this pallet does regardless). Read more

Handler for when a new account has just been created.

A function that is invoked when an account has been determined to be dead. Read more

The designated SS85 prefix of this chain. Read more

What to do if the user wants the code set to something. Just use () unless you are in cumulus. Read more

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

The maximum number of named reserves that can exist on an account.

The id type for named reserves.

The balance of an account.

Handler for the unbalanced reduction when removing a dust account.

The overarching event type.

The minimum amount required to keep an account open.

The means of storing the balances of an account.

Weight information for extrinsics in this pallet.

Prefix for elements stored in the Off-chain DB via Indexing API. Read more

A hasher type for MMR. Read more

The hashing output type. Read more

Data stored in the leaf nodes. Read more

A hook to act on the new MMR root. Read more

Weights for this pallet.

The treasury’s pallet id, used for deriving its sovereign account ID.

The staking balance.

Origin from which approvals must come.

Origin from which rejections must come.

The overarching event type.

Handler for the unbalanced decrease when slashing for a rejected proposal or bounty.

Fraction of a proposal’s value that should be bonded in order to place the proposal. An accepted proposal gets these back. A rejected proposal does not. Read more

Minimum amount of funds that should be placed in a deposit for making a proposal.

Period between successive spends.

Percentage of spare funds (if any) that are burnt per spend period.

Handler for the unbalanced decrease when treasury funds are burned.

Runtime hooks to external pallet using treasury to compute spend funds.

Weight information for extrinsics in this pallet.

The maximum number of approvals that can wait in the spending queue.

The overarching event type.

The units in which we record balances.

Identifier for the class of asset.

The currency mechanism.

The origin which may forcibly create or destroy an asset or otherwise alter privileged attributes. Read more

The basic amount of funds that must be reserved for an asset.

The basic amount of funds that must be reserved when adding metadata to your asset.

The additional funds that must be reserved for the number of bytes you store in your metadata. Read more

The amount of funds that must be reserved when creating a new approval.

The maximum length of a name or symbol stored on-chain.

A hook to allow a per-asset, per-account minimum balance to be enforced. This must be respected in all permissionless operations. Read more

Additional data to be stored with an account’s asset balance.

Weight information for extrinsics in this pallet.

The overarching event type.

Identifier for the class of asset.

The type used to identify a unique asset within an asset class.

The currency mechanism, used for paying for reserves.

The origin which may forcibly create or destroy an asset or otherwise alter privileged attributes. Read more

The basic amount of funds that must be reserved for an asset class.

The basic amount of funds that must be reserved for an asset instance.

The basic amount of funds that must be reserved when adding metadata to your asset.

The basic amount of funds that must be reserved when adding an attribute to an asset.

The additional funds that must be reserved for the number of bytes store in metadata, either “normal” metadata or attribute metadata. Read more

The maximum length of data stored on-chain.

The maximum length of an attribute key.

The maximum length of an attribute value.

Weight information for extrinsics in this pallet.

The overarching event type.

The societies’s module id

The currency type used for bidding.

Something that provides randomness in the runtime.

The minimum amount of a deposit required for a bid to be made.

The amount of the unpaid reward that gets deducted in the case that either a skeptic doesn’t vote or someone votes in the wrong way. Read more

The number of times a member may vote the wrong way (or not at all, when they are a skeptic) before they become suspended. Read more

The amount of incentive paid within each period. Doesn’t include VoterTip.

The receiver of the signal for when the members have changed.

The number of blocks between candidate/membership rotation periods.

The maximum duration of the payout lock.

The origin that is allowed to call found.

The origin that is allowed to make suspension judgements.

The maximum number of candidates that we accept per round.

The number of blocks between membership challenges.

The outer origin type.

The outer call dispatch type.

The outer event type.

The time-out for council motions.

Maximum number of proposals allowed to be active in parallel.

The maximum number of members supported by the pallet. Used for weight estimation. Read more

Default vote strategy of this collective.

Weight information for extrinsics in this pallet.

The overarching event type.

Required origin for adding a member (though can always be Root).

Required origin for removing a member (though can always be Root).

Required origin for adding and removing a member in a single action.

Required origin for resetting membership.

Required origin for setting or resetting the prime member.

The receiver of the signal for when the membership has been initialized. This happens pre- genesis and will usually be the same as MembershipChanged. If you need to do something different on initialization, then you can change this accordingly. Read more

The receiver of the signal for when the membership has changed.

The maximum number of members that this membership can have. Read more

Weight information for extrinsics in this pallet.

The outer origin type.

The outer call dispatch type.

The outer event type.

The time-out for council motions.

Maximum number of proposals allowed to be active in parallel.

The maximum number of members supported by the pallet. Used for weight estimation. Read more

Default vote strategy of this collective.

Weight information for extrinsics in this pallet.

The safest default is to allow no calls at all.

Runtimes should whitelist dispatchables that are allowed to be called from contracts and make sure they are stable. Dispatchables exposed to contracts are not allowed to change because that would break already deployed contracts. The Call structure itself is not allowed to change the indices of existing pallets, too.

The time implementation used to supply timestamps to conntracts through seal_now.

The generator used to supply randomness to contracts through seal_random.

The currency in which fees are paid and contract balances are held.

The overarching event type.

The overarching call type.

Handler for rent payments.

Number of block delay an extrinsic claim surcharge has. Read more

The minimum amount required to generate a tombstone.

The balance every contract needs to deposit to stay alive indefinitely. Read more

The balance a contract needs to deposit per storage byte to stay alive indefinitely. Read more

The balance a contract needs to deposit per storage item to stay alive indefinitely. Read more

The fraction of the deposit that should be used as rent per block. Read more

Reward that is received by the party whose touch has led to removal of a contract. Read more

The type of the call stack determines the maximum nesting depth of contract calls. Read more

Used to answer contracts’ queries regarding the current weight price. This is not used to calculate the actual fee and is only for informational purposes. Read more

Describes the weights of the dispatchables of this module and is also used to construct a default cost schedule. Read more

Type that allows the runtime authors to add new host functions for a contract to call.

The maximum number of tries that can be queued for deletion.

The maximum amount of weight that can be consumed per block for lazy trie removal.

Cost schedule and limits.

The overarching event type.

The overarching call type.

Weight information for extrinsics in this pallet.

Type used for storing an account’s index; implies the maximum number of accounts the system can hold. Read more

The currency trait.

The deposit needed for reserving an index.

The overarching event type.

Weight information for extrinsics in this pallet.

A straight majority of the council can decide what their next motion is.

A super-majority can have the next scheduled referendum be a straight majority-carries vote.

A unanimous council can have the next scheduled referendum be a straight default-carries (NTB) vote.

Two thirds of the technical committee can have an ExternalMajority/ExternalDefault vote be tabled immediately and with a shorter voting/enactment period.

Currency type for this pallet.

The minimum period of locking and the period between a proposal being approved and enacted. Read more

How often (in blocks) new public referenda are launched.

How often (in blocks) to check for new votes.

The minimum amount to be used as a deposit for a public referendum proposal.

Origin from which the next majority-carries (or more permissive) referendum may be tabled to vote immediately and asynchronously in a similar manner to the emergency origin. It retains its threshold method. Read more

Indicator for whether an emergency origin is even allowed to happen. Some chains may want to set this permanently to false, others may want to condition it on things such as an upgrade having happened recently. Read more

Minimum voting period allowed for a fast-track referendum.

Origin from which any referendum may be cancelled in an emergency.

Origin from which a proposal may be cancelled and its backers slashed.

Origin from which proposals may be blacklisted.

Origin for anyone able to veto proposals. Read more

Period in blocks where an external proposal may not be re-submitted after being vetoed.

The amount of balance that must be deposited per byte of preimage stored.

An origin that can provide a preimage using operational extrinsics.

Handler for the unbalanced reduction when slashing a preimage deposit.

The Scheduler.

Overarching type of all pallets origins.

The maximum number of votes for an account. Read more

Weight information for extrinsics in this pallet.

The maximum number of public proposals that can exist at any time.

Identifier for the elections-phragmen pallet’s lock

The currency that people are electing with.

What to do when the members change.

What to do with genesis members

Convert a balance into a number used for election calculation. This must fit into a u64 but is allowed to be sensibly lossy. Read more

How much should be locked up in order to submit one’s candidacy.

Base deposit associated with voting. Read more

The amount of bond that need to be locked for each vote (32 bytes).

Handler for the unbalanced reduction when a candidate has lost (and is not a runner-up)

Handler for the unbalanced reduction when a member has been kicked.

Number of members to elect.

Number of runners_up to keep.

How long each seat is kept. This defines the next block number at which an election round will happen. If set to zero, no elections are ever triggered and the module will be in passive mode. Read more

Weight information for extrinsics in this pallet.

The overarching event type.

A sudo-able call.

The overarching event type.

Full identification of the validator.

A handler called for every offence report.

The overarching event type.

The currency trait.

The amount held on deposit for a registered identity

The amount held on deposit per additional field for a registered identity.

The amount held on deposit for a registered subaccount. This should account for the fact that one storage item’s value will increase by the size of an account ID, and there will be another trie item whose value is the size of an account ID plus 32 bytes. Read more

The maximum number of sub-accounts allowed per identified account.

Maximum number of additional fields that may be stored in an ID. Needed to bound the I/O required to access an identity, but can be pretty high. Read more

Maxmimum number of registrars allowed in the system. Needed to bound the complexity of, e.g., updating judgements. Read more

What to do with slashed funds.

The origin which may forcibly set or remove a name. Root can always do this.

The origin which may add or remove registrars. Root can always do this.

Weight information for extrinsics in this pallet.

The overarching event type.

The overarching call type.

The currency mechanism.

The base amount of currency needed to reserve for creating a recovery configuration. Read more

The amount of currency needed per additional user when creating a recovery configuration. Read more

The maximum amount of friends allowed in a recovery configuration.

The base amount of currency needed to reserve for starting a recovery. Read more

The overarching event type.

The currency trait.

Convert the block number into a balance.

The minimum amount transferred to call vested_transfer.

Weight information for extrinsics in this pallet.

The overarching event type.

The aggregated origin which the dispatch will take.

The caller origin, overarching type of all pallets origins.

The aggregated call type.

The maximum weight that may be scheduled per block for any dispatchables of less priority than schedule::HARD_DEADLINE. Read more

Required origin to schedule or cancel calls.

The maximum number of scheduled calls in the queue for a single block. Not strictly enforced, but used for weight estimation. Read more

Weight information for extrinsics in this pallet.

Currency type.

Something that can predict the fee of a call. Used to sensibly distribute rewards.

Duration of the signed phase.

Duration of the unsigned phase.

The minimum amount of improvement to the solution score that defines a solution as “better” (in any phase). Read more

The repeat threshold of the offchain worker. Read more

Maximum number of iteration of balancing that will be executed in the embedded miner of the pallet. Read more

Maximum weight that the miner should consume. Read more

Maximum length (bytes) that the mined solution should consume. Read more

The priority of the unsigned transaction submitted in the unsigned-phase

Maximum number of signed submissions that can be queued. Read more

Base reward for a signed solution

Base deposit for a signed solution.

Per-byte deposit for a signed solution.

Per-weight deposit for a signed solution.

Maximum weight of a signed solution. Read more

Handler for the slashed deposits.

Handler for the rewards.

Something that will provide the election data.

Accuracy used for fallback on-chain election.

The solution type.

Configuration for the fallback

The weight of the pallet.

Origin that can control this pallet. Note that any action taken by this origin (such) as providing an emergency solution is not checked. Thus, it must be a trusted origin. Read more

The configuration of benchmarking.

The overarching event type.

The overarching call type.

The currency mechanism.

A kind of proxy; specified with the proxy and passed in to the IsProxyable fitler. The instance filter determines whether a given call may be proxied under this type. Read more

The base amount of currency needed to reserve for creating a proxy. Read more

The amount of currency needed per proxy added. Read more

The maximum amount of proxies allowed for a single account.

Weight information for extrinsics in this pallet.

The maximum amount of time-delayed announcements that are allowed to be pending.

The type of hash used for hashing the call.

The base amount of currency needed to reserve for creating an announcement. Read more

The amount of currency needed per announcement made. Read more

The overarching event type.

The overarching call type.

The currency mechanism.

The base amount of currency needed to reserve for creating a multisig execution or to store a dispatch call for later. Read more

The amount of currency needed per unit threshold when creating a multisig execution. Read more

The maximum amount of signatories allowed in the multisig.

Weight information for extrinsics in this pallet.

The overarching event type.

The amount held on deposit for placing a bounty proposal.

The delay period for which a bounty beneficiary need to wait before claim the payout.

Bounty duration in blocks.

Percentage of the curator fee that will be reserved upfront as deposit for bounty curator.

Minimum value for a bounty.

The amount held on deposit per byte within the tip report reason or bounty description.

Maximum acceptable reason length.

Weight information for extrinsics in this pallet.

The overarching event type.

The amount held on deposit per byte within the tip report reason or bounty description.

Maximum acceptable reason length.

Origin from which tippers must come. Read more

The period for which a tip remains open after is has achieved threshold tippers.

The percent of the final tip which goes to the original reporter of the tip.

The amount held on deposit for placing a tip report.

Weight information for extrinsics in this pallet.

The Lottery’s pallet id

A dispatchable call.

The currency trait.

Something that provides randomness in the runtime.

The overarching event type.

The manager origin.

The max number of calls available in a single lottery.

Used to determine if a call would be valid for purchasing a ticket. Read more

Number of time we should try to generate a random number that has no modulo bias. The larger this number, the more potential computation is used for picking the winner, but also the more likely that the chosen winner is done fairly. Read more

Weight information for extrinsics in this pallet.

Overarching event type.

Currency type that this works on.

Just the Currency::Balance type; we have this item to allow us to constrain it to From<u64>. Read more

Origin required for setting the target proportion to be under gilt.

Unbalanced handler to account for funds created (in case of a higher total issuance over freezing period). Read more

Unbalanced handler to account for funds destroyed (in case of a lower total issuance over freezing period). Read more

The issuance to ignore. This is subtracted from the Currency’s total_issuance to get the issuance by which we inflate or deflate the gilt. Read more

Number of duration queues in total. This sets the maximum duration supported, which is this value multiplied by Period. Read more

Maximum number of items that may be in each duration queue.

Portion of the queue which is free from ordering and just a FIFO. Read more

The base period for the duration queues. This is the common multiple across all supported freezing durations that can be bid upon. Read more

The minimum amount of funds that may be offered to freeze for a gilt. Note that this does not actually limit the amount which may be frozen in a gilt since gilts may be split up in order to satisfy the desired amount of funds under gilts. Read more

The number of blocks between consecutive attempts to issue more gilts in an effort to get to the target amount to be frozen. Read more

The maximum amount of bids that can be turned into issued gilts each block. A larger value here means less of the block available for transactions should there be a glut of bids to make into gilts to reach the target. Read more

Information on runtime weights.

The overarching event type.

The currency trait.

A dispatchable call.

Handler for the unbalanced decrease when fees are burned.

Weight information for extrinsics in this pallet.

The amount of time, in slots, that each epoch should last. NOTE: Currently it is not possible to change the epoch duration after the chain has started. Attempting to do so will brick block production. Read more

The expected average block time at which BABE should be creating blocks. Since BABE is probabilistic it is not trivial to figure out what the expected average block time should be based on the slot duration and the security parameter c (where 1 - c represents the probability of a slot being empty). Read more

BABE requires some logic to be triggered on every block to query for whether an epoch has ended and to perform the transition to the next epoch. Read more

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. Read more

A system for proving ownership of keys, i.e. that a given key was part of a validator set, needed for validating equivocation reports. Read more

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

The identification of a key owner, used when reporting equivocations.

The equivocation handling subsystem, defines methods to report an offence (after the equivocation has been validated) and for submitting a transaction to report an equivocation (from an offchain context). NOTE: when enabling equivocation handling (i.e. this type isn’t set to ()) you must use this pallet’s ValidateUnsigned in the runtime definition. Read more

Type used for expressing timestamp.

Something which can be notified when the timestamp is set. Set this to () if not needed. Read more

The minimum period between blocks. Beware that this is different to the expected period that the block production apparatus provides. Your chosen consensus system will generally work with this to determine a sensible block time. e.g. For Aura, it will be double this period on default settings. Read more

Weight information for extrinsics in this pallet.

The event type of this module.

The function call.

A system for proving ownership of keys, i.e. that a given key was part of a validator set, needed for validating equivocation reports. Read more

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

The identification of a key owner, used when reporting equivocations.

The equivocation handling subsystem, defines methods to report an offence (after the equivocation has been validated) and for submitting a transaction to report an equivocation (from an offchain context). NOTE: when enabling equivocation handling (i.e. this type isn’t set to ()) you must use this pallet’s ValidateUnsigned in the runtime definition. Read more

Weights for this pallet.

Find the author of a block.

The number of blocks back we should accept uncles. This means that we will deal with uncle-parents that are UncleGenerations + 1 before now. Read more

A filter for uncles within a block. This is for implementing further constraints on what uncles can be included, other than their ancestry. Read more

An event handler for authored blocks.

Full identification of the validator.

A conversion from validator ID to full identification. Read more

The overarching event type.

A stable ID for a validator.

A conversion from account ID to validator ID. Read more

Indicator for when to end the session.

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. Read more

Handler for managing new session.

Handler when a session has changed.

The keys.

The fraction of validators set that is safe to be disabled. Read more

Weight information for extrinsics in this pallet.

The identifier type for an authority.

The overarching event type.

A trait that allows us to estimate the current session progress and also the average session length. Read more

A type for retrieving the validators supposed to be online in a session.

A type that gives us the ability to submit unresponsiveness offence reports.

A configuration for base priority of unsigned transactions. Read more

Weight information for extrinsics in this pallet.

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. Read more

The fee to be paid for making a transaction; the per-byte portion.

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

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

A super-majority of the council can cancel the slash.

Maximum number of nominations per nominator.

The staking balance.

Time used for computing era duration. Read more

Convert a balance into a number used for election calculation. This must fit into a u64 but is allowed to be sensibly lossy. The u64 is used to communicate with the sp_npos_elections crate which accepts u64 numbers and does operations in 128. Consequently, the backward convert is used convert the u128s from sp-elections back to a BalanceOf. Read more

Tokens have been minted and are unused for validator-reward. See Era payout. Read more

The overarching event type.

Handler for the unbalanced reduction when slashing a staker.

Handler for the unbalanced increment when rewarding a staker.

Number of sessions per era.

Number of eras that staked funds must remain bonded for.

Number of eras that slashes are deferred by, after computation. Read more

Interface for interacting with a session pallet.

The payout for validators and the system for the current era. See Era payout. Read more

Something that can estimate the next session change, accurately or as a best effort guess. Read more

The maximum number of nominators rewarded for each validator. Read more

Something that provides the election functionality.

Something that provides the election functionality at genesis.

Weight information for extrinsics in this pallet.

Perform a call from a specified account to a given contract. Read more

Instantiate a new contract. Read more

Query a given storage key in a given contract. Read more

Returns the projected time a given contract will be able to sustain paying its rent. Read more

Returns the version of the runtime.

Execute the given block.

Initialize a block with the given header.

Attempt to create signed extrinsic data that encodes call from given account. Read more

Formats the value using the given formatter. Read more

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

The NodeBlock type.

The RuntimeBlock type.

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

Get current GRANDPA authority set id.

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. Read more

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. Read more

Returns the metadata of a runtime.

Generate MMR proof for a leaf under given index.

Verify MMR proof against on-chain MMR. Read more

Verify MMR proof against given root hash. Read more

Generate MMR proof for a leaf under given index.

Generate MMR proof for a leaf under given index.

Verify MMR proof against on-chain MMR. Read more

Verify MMR proof against on-chain MMR. Read more

Verify MMR proof against given root hash. Read more

Verify MMR proof against given root hash. Read more

Starts the off-chain task for given block header.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

The extrinsic type expected by the runtime.

The runtime’s call type. Read more

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

Decode the given public session keys. Read more

A public key that is capable of identifying AccountIds. Read more

A matching Signature type.

Validate the transaction. Read more

dry-run runtime upgrades, returning the total weight consumed. Read more

The call to validate

Validate the call right before dispatch. Read more

Return the validity of the call Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

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

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

Convert Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can then be further downcast into Box<ConcreteType> where ConcreteType implements Trait. Read more

Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait. Read more

Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s. Read more

Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s. Read more

Convert Arc<Trait> (where Trait: Downcast) to Arc<Any>. Arc<Any> can then be further downcast into Arc<ConcreteType> where ConcreteType implements Trait. Read more

Performs the conversion.

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

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

Performs the conversion.

Cast reference.

Cast reference.

Cast mutable reference.

Cast mutable reference.

Get a reference to the inner from the outer.

Get a mutable reference to the inner from the outer.

Should always be Self

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

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

Performance hack: Clone doesn’t get inlined for Copy types in debug mode, so make it inline anyway.

Tests if Self the same as the type T Read more

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more

Checks if self is actually part of its subset T (and can be converted to it).

Use with care! Same as self.to_subset but without any property checks. Always succeeds.

The inclusion map: converts self to the equivalent element of its superset.

The resulting type after obtaining ownership.

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

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

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

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The counterpart to unchecked_from.

Consume self to return an equivalent value of T.