Struct pallet_starknet::pallet::Pallet
source · pub struct Pallet<T>(_);
Expand description
The Pallet
struct, the main type that implements traits and standalone
functions within the pallet.
Implementations§
source§impl<T: Config> Pallet<T>
impl<T: Config> Pallet<T>
pub fn estimate_fee( transactions: Vec<AccountTransaction>, simulation_flags: &SimulationFlags ) -> Result<Result<Vec<FeeEstimate>, SimulationError>, InternalSubstrateError>
pub fn simulate_transactions( transactions: Vec<AccountTransaction>, simulation_flags: &SimulationFlags ) -> Result<Vec<TransactionSimulationResult>, InternalSubstrateError>
pub fn simulate_message( message: L1HandlerTransaction, simulation_flags: &SimulationFlags ) -> Result<Result<TransactionExecutionInfo, SimulationError>, InternalSubstrateError>
pub fn estimate_message_fee( message: L1HandlerTransaction ) -> Result<Result<FeeEstimate, SimulationError>, InternalSubstrateError>
pub fn re_execute_transactions( transactions_before: Vec<Transaction>, transactions_to_trace: Vec<Transaction>, with_state_diff: bool ) -> Result<ReExecutionResult, InternalSubstrateError>
pub fn get_transaction_re_execution_state_diff( transactions_before: Vec<Transaction>, transactions_to_trace: Vec<Transaction> ) -> Result<Result<CommitmentStateDiff, SimulationError>, InternalSubstrateError>
source§impl<T: Config> Pallet<T>
impl<T: Config> Pallet<T>
pub fn pre_validate_unsigned_tx( transaction: &Transaction ) -> Result<(), InvalidTransaction>
pub fn validate_unsigned_tx( transaction: &Transaction ) -> Result<(), InvalidTransaction>
pub fn ensure_l1_message_not_executed( nonce: &Nonce ) -> Result<(), InvalidTransaction>
source§impl<T: Config> Pallet<T>
impl<T: Config> Pallet<T>
The Starknet pallet external functions. Dispatchable functions allows users to interact with the pallet and invoke state changes. These functions materialize as “extrinsics”, which are often compared to transactions. Dispatchable functions must be annotated with a weight and must return a DispatchResult.
sourcepub fn set_starknet_inherent_data(
origin: OriginFor<T>,
data: InherentType
) -> DispatchResult
pub fn set_starknet_inherent_data( origin: OriginFor<T>, data: InherentType ) -> DispatchResult
Set the current block author’s sequencer address.
This call should be invoked exactly once per block. It will set a default value at the finalization phase, if this call hasn’t been invoked by that time.
The dispatch origin for this call must be Inherent
.
sourcepub fn invoke(
origin: OriginFor<T>,
transaction: InvokeTransaction
) -> DispatchResult
pub fn invoke( origin: OriginFor<T>, transaction: InvokeTransaction ) -> DispatchResult
The invoke transaction is the main transaction type used to invoke contract functions in
Starknet.
See https://docs.starknet.io/documentation/architecture_and_concepts/Blocks/transactions/#invoke_transaction
.
Arguments
origin
- The origin of the transaction.transaction
- The Starknet transaction.
Returns
DispatchResult
- The result of the transaction.
sourcepub fn declare(
origin: OriginFor<T>,
transaction: DeclareTransaction
) -> DispatchResult
pub fn declare( origin: OriginFor<T>, transaction: DeclareTransaction ) -> DispatchResult
The declare transaction is used to introduce new classes into the state of Starknet,
enabling other contracts to deploy instances of those classes or using them in a library
call. See https://docs.starknet.io/documentation/architecture_and_concepts/Blocks/transactions/#declare_transaction
.
Arguments
origin
- The origin of the transaction.transaction
- The Starknet transaction.
Returns
DispatchResult
- The result of the transaction.
sourcepub fn deploy_account(
origin: OriginFor<T>,
transaction: DeployAccountTransaction
) -> DispatchResult
pub fn deploy_account( origin: OriginFor<T>, transaction: DeployAccountTransaction ) -> DispatchResult
Since Starknet v0.10.1 the deploy_account transaction replaces the deploy transaction
for deploying account contracts. To use it, you should first pre-fund your
would-be account address so that you could pay the transaction fee (see here for more
details) . You can then send the deploy_account transaction. See https://docs.starknet.io/documentation/architecture_and_concepts/Blocks/transactions/#deploy_account_transaction
.
Arguments
origin
- The origin of the transaction.transaction
- The Starknet transaction.
Returns
DispatchResult
- The result of the transaction.
sourcepub fn consume_l1_message(
origin: OriginFor<T>,
transaction: L1HandlerTransaction
) -> DispatchResult
pub fn consume_l1_message( origin: OriginFor<T>, transaction: L1HandlerTransaction ) -> DispatchResult
source§impl<T: Config> Pallet<T>
impl<T: Config> Pallet<T>
sourcepub fn pending_hashes() -> Vec<TransactionHash>
pub fn pending_hashes() -> Vec<TransactionHash>
An auto-generated getter for PendingHashes
.
source§impl<T: Config> Pallet<T>
impl<T: Config> Pallet<T>
sourcepub fn tx_messages<KArg>(k: KArg) -> Vec<MessageToL1>where
KArg: EncodeLike<TransactionHash>,
pub fn tx_messages<KArg>(k: KArg) -> Vec<MessageToL1>where KArg: EncodeLike<TransactionHash>,
An auto-generated getter for TxMessages
.
source§impl<T: Config> Pallet<T>
impl<T: Config> Pallet<T>
sourcepub fn tx_revert_error<KArg>(k: KArg) -> Option<String>where
KArg: EncodeLike<TransactionHash>,
pub fn tx_revert_error<KArg>(k: KArg) -> Option<String>where KArg: EncodeLike<TransactionHash>,
An auto-generated getter for TxRevertError
.
source§impl<T: Config> Pallet<T>
impl<T: Config> Pallet<T>
sourcepub fn contract_state_root_by_address<KArg>(k: KArg) -> Option<Felt252Wrapper>where
KArg: EncodeLike<ContractAddress>,
pub fn contract_state_root_by_address<KArg>(k: KArg) -> Option<Felt252Wrapper>where KArg: EncodeLike<ContractAddress>,
An auto-generated getter for ContractsStateRoots
.
source§impl<T: Config> Pallet<T>
impl<T: Config> Pallet<T>
sourcepub fn pending_storage_changes<KArg>(k: KArg) -> Vec<StorageSlot>where
KArg: EncodeLike<ContractAddress>,
pub fn pending_storage_changes<KArg>(k: KArg) -> Vec<StorageSlot>where KArg: EncodeLike<ContractAddress>,
An auto-generated getter for PendingStorageChanges
.
source§impl<T: Config> Pallet<T>
impl<T: Config> Pallet<T>
sourcepub fn block_hash<KArg>(k: KArg) -> Felt252Wrapperwhere
KArg: EncodeLike<u64>,
pub fn block_hash<KArg>(k: KArg) -> Felt252Wrapperwhere KArg: EncodeLike<u64>,
An auto-generated getter for BlockHash
.
source§impl<T: Config> Pallet<T>
impl<T: Config> Pallet<T>
sourcepub fn contract_class_hash_by_address<KArg>(k: KArg) -> CasmClassHashwhere
KArg: EncodeLike<ContractAddress>,
pub fn contract_class_hash_by_address<KArg>(k: KArg) -> CasmClassHashwhere KArg: EncodeLike<ContractAddress>,
An auto-generated getter for ContractClassHashes
.
source§impl<T: Config> Pallet<T>
impl<T: Config> Pallet<T>
sourcepub fn contract_class_by_class_hash<KArg>(k: KArg) -> Option<ContractClass>where
KArg: EncodeLike<SierraOrCasmClassHash>,
pub fn contract_class_by_class_hash<KArg>(k: KArg) -> Option<ContractClass>where KArg: EncodeLike<SierraOrCasmClassHash>,
An auto-generated getter for ContractClasses
.
source§impl<T: Config> Pallet<T>
impl<T: Config> Pallet<T>
sourcepub fn compiled_class_hash_by_class_hash<KArg>(
k: KArg
) -> Option<CompiledClassHash>where
KArg: EncodeLike<SierraClassHash>,
pub fn compiled_class_hash_by_class_hash<KArg>( k: KArg ) -> Option<CompiledClassHash>where KArg: EncodeLike<SierraClassHash>,
An auto-generated getter for CompiledClassHashes
.
source§impl<T: Config> Pallet<T>
impl<T: Config> Pallet<T>
sourcepub fn storage<KArg>(k: KArg) -> StarkFeltwhere
KArg: EncodeLike<ContractStorageKey>,
pub fn storage<KArg>(k: KArg) -> StarkFeltwhere KArg: EncodeLike<ContractStorageKey>,
An auto-generated getter for StorageView
.
source§impl<T: Config> Pallet<T>
impl<T: Config> Pallet<T>
sourcepub fn last_known_eth_block() -> Option<u64>
pub fn last_known_eth_block() -> Option<u64>
An auto-generated getter for LastKnownEthBlock
.
source§impl<T: Config> Pallet<T>
impl<T: Config> Pallet<T>
sourcepub fn fee_token_addresses() -> FeeTokenAddresses
pub fn fee_token_addresses() -> FeeTokenAddresses
An auto-generated getter for FeeTokens
.
source§impl<T: Config> Pallet<T>
impl<T: Config> Pallet<T>
sourcepub fn sequencer_address() -> ContractAddress
pub fn sequencer_address() -> ContractAddress
An auto-generated getter for SequencerAddress
.
source§impl<T: Config> Pallet<T>
impl<T: Config> Pallet<T>
sourcepub fn current_l1_gas_prices() -> L1GasPrices
pub fn current_l1_gas_prices() -> L1GasPrices
An auto-generated getter for CurrentL1GasPrice
.
source§impl<T: Config> Pallet<T>
impl<T: Config> Pallet<T>
sourcepub fn inherent_update() -> bool
pub fn inherent_update() -> bool
An auto-generated getter for InherentUpdate
.
source§impl<T: Config> Pallet<T>
impl<T: Config> Pallet<T>
sourcepub fn l1_messages() -> BTreeSet<Nonce>
pub fn l1_messages() -> BTreeSet<Nonce>
An auto-generated getter for L1Messages
.
source§impl<T: Config> Pallet<T>
impl<T: Config> Pallet<T>
sourcepub fn chain_id() -> Felt252Wrapper
pub fn chain_id() -> Felt252Wrapper
An auto-generated getter for ChainIdStorage
.
source§impl<T: Config> Pallet<T>
impl<T: Config> Pallet<T>
The Starknet pallet internal functions.
sourcepub fn get_block_context() -> BlockContext
pub fn get_block_context() -> BlockContext
Creates a [BlockContext] object. The [BlockContext] is needed by the blockifier to execute properly the transaction. Substrate caches data so it’s fine to call multiple times this function, only the first transaction/block will be “slow” to load these data.
sourcepub fn chain_id_str() -> String
pub fn chain_id_str() -> String
convert chain_id
sourcepub fn parent_block_hash(current_block_number: &u64) -> Felt252Wrapper
pub fn parent_block_hash(current_block_number: &u64) -> Felt252Wrapper
sourcepub fn block_timestamp() -> u64
pub fn block_timestamp() -> u64
sourcepub fn transaction_count() -> u128
pub fn transaction_count() -> u128
Get the number of transactions in the block.
sourcepub fn event_count() -> u128
pub fn event_count() -> u128
Get the number of events in the block.
sourcepub fn call_contract(
address: ContractAddress,
function_selector: EntryPointSelector,
calldata: Calldata
) -> Result<Vec<Felt252Wrapper>, SimulationError>
pub fn call_contract( address: ContractAddress, function_selector: EntryPointSelector, calldata: Calldata ) -> Result<Vec<Felt252Wrapper>, SimulationError>
Call a smart contract function.
sourcepub fn get_storage_at(
contract_address: ContractAddress,
key: StorageKey
) -> Result<StarkFelt, SimulationError>
pub fn get_storage_at( contract_address: ContractAddress, key: StorageKey ) -> Result<StarkFelt, SimulationError>
Get storage value at
pub fn emit_and_store_tx_and_fees_events( tx_hash: TransactionHash, execute_call_info: &Option<CallInfo>, fee_transfer_call_info: &Option<CallInfo> )
pub fn program_hash() -> Felt252Wrapper
pub fn is_transaction_fee_disabled() -> bool
Trait Implementations§
source§impl<T: Config> GetStorageVersion for Pallet<T>
impl<T: Config> GetStorageVersion for Pallet<T>
§type CurrentStorageVersion = NoStorageVersionSet
type CurrentStorageVersion = NoStorageVersionSet
source§fn current_storage_version() -> Self::CurrentStorageVersion
fn current_storage_version() -> Self::CurrentStorageVersion
source§fn on_chain_storage_version() -> StorageVersion
fn on_chain_storage_version() -> StorageVersion
source§impl<T: Config> Hooks<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T>
impl<T: Config> Hooks<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T>
source§fn on_finalize(_n: BlockNumberFor<T>)
fn on_finalize(_n: BlockNumberFor<T>)
The block is being finalized.
source§fn on_initialize(_: BlockNumberFor<T>) -> Weight
fn on_initialize(_: BlockNumberFor<T>) -> Weight
The block is being initialized. Implement to have something happen.
source§fn on_runtime_upgrade() -> Weight
fn on_runtime_upgrade() -> Weight
Perform a module upgrade.
§fn on_idle(_n: BlockNumber, _remaining_weight: Weight) -> Weight
fn on_idle(_n: BlockNumber, _remaining_weight: Weight) -> Weight
Hooks::on_finalize
]). Read more§fn offchain_worker(_n: BlockNumber)
fn offchain_worker(_n: BlockNumber)
§fn integrity_test()
fn integrity_test()
source§impl<T: Config> IntegrityTest for Pallet<T>
impl<T: Config> IntegrityTest for Pallet<T>
source§fn integrity_test()
fn integrity_test()
Hooks::integrity_test
].source§impl<T: Config> OffchainWorker<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T>
impl<T: Config> OffchainWorker<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T>
source§fn offchain_worker(n: BlockNumberFor<T>)
fn offchain_worker(n: BlockNumberFor<T>)
source§impl<T: Config> OnFinalize<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T>
impl<T: Config> OnFinalize<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T>
source§fn on_finalize(n: BlockNumberFor<T>)
fn on_finalize(n: BlockNumberFor<T>)
Hooks::on_finalize
].source§impl<T: Config> OnGenesis for Pallet<T>
impl<T: Config> OnGenesis for Pallet<T>
source§fn on_genesis()
fn on_genesis()
source§impl<T: Config> OnIdle<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T>
impl<T: Config> OnIdle<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T>
source§impl<T: Config> OnInitialize<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T>
impl<T: Config> OnInitialize<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T>
source§fn on_initialize(n: BlockNumberFor<T>) -> Weight
fn on_initialize(n: BlockNumberFor<T>) -> Weight
Hooks::on_initialize
].source§impl<T: Config> OnRuntimeUpgrade for Pallet<T>
impl<T: Config> OnRuntimeUpgrade for Pallet<T>
source§fn on_runtime_upgrade() -> Weight
fn on_runtime_upgrade() -> Weight
Hooks::on_runtime_upgrade
].source§impl<T: Config> PalletInfoAccess for Pallet<T>
impl<T: Config> PalletInfoAccess for Pallet<T>
source§fn module_name() -> &'static str
fn module_name() -> &'static str
source§fn crate_version() -> CrateVersion
fn crate_version() -> CrateVersion
source§impl<T> PartialEq<Pallet<T>> for Pallet<T>
impl<T> PartialEq<Pallet<T>> for Pallet<T>
source§impl<T: Config> ProvideInherent for Pallet<T>
impl<T: Config> ProvideInherent for Pallet<T>
source§const INHERENT_IDENTIFIER: InherentIdentifier = STARKNET_INHERENT_IDENTIFIER
const INHERENT_IDENTIFIER: InherentIdentifier = STARKNET_INHERENT_IDENTIFIER
source§fn create_inherent(data: &InherentData) -> Option<Self::Call>
fn create_inherent(data: &InherentData) -> Option<Self::Call>
InherentData
. Read moresource§fn is_inherent(call: &Self::Call) -> bool
fn is_inherent(call: &Self::Call) -> bool
§fn is_inherent_required(
_: &InherentData
) -> Result<Option<Self::Error>, Self::Error>
fn is_inherent_required( _: &InherentData ) -> Result<Option<Self::Error>, Self::Error>
§fn check_inherent(_: &Self::Call, _: &InherentData) -> Result<(), Self::Error>
fn check_inherent(_: &Self::Call, _: &InherentData) -> Result<(), Self::Error>
source§impl<T: Config> ValidateUnsigned for Pallet<T>
impl<T: Config> ValidateUnsigned for Pallet<T>
source§fn validate_unsigned(
_source: TransactionSource,
call: &Self::Call
) -> TransactionValidity
fn validate_unsigned( _source: TransactionSource, call: &Self::Call ) -> TransactionValidity
Validate unsigned call to this module.
By default unsigned transactions are disallowed, but implementing the validator here we make sure that some particular calls (in this case all calls) are being whitelisted and marked as valid.
source§fn pre_dispatch(_call: &Self::Call) -> Result<(), TransactionValidityError>
fn pre_dispatch(_call: &Self::Call) -> Result<(), TransactionValidityError>
From substrate documentation: Validate the call right before dispatch. This method should be used to prevent transactions already in the pool (i.e. passing validate_unsigned) from being included in blocks in case they became invalid since being added to the pool.
In the default implementation of pre_dispatch for the ValidateUnsigned trait,
this function calls the validate_unsigned function in order to verify validity
before dispatch. In our case, since transaction was already validated in
validate_unsigned
we can just return Ok.
source§impl<T: Config> WhitelistedStorageKeys for Pallet<T>
impl<T: Config> WhitelistedStorageKeys for Pallet<T>
source§fn whitelisted_storage_keys() -> Vec<TrackedStorageKey>
fn whitelisted_storage_keys() -> Vec<TrackedStorageKey>
Vec<TrackedStorageKey>
indicating the storage keys that
should be whitelisted during benchmarking. This means that those keys
will be excluded from the benchmarking performance calculation.impl<T> Eq for Pallet<T>
Auto Trait Implementations§
impl<T> RefUnwindSafe for Pallet<T>where T: RefUnwindSafe,
impl<T> Send for Pallet<T>where T: Send,
impl<T> Sync for Pallet<T>where T: Sync,
impl<T> Unpin for Pallet<T>where T: Unpin,
impl<T> UnwindSafe for Pallet<T>where T: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> CheckedConversion for T
impl<T> CheckedConversion for T
§fn checked_from<T>(t: T) -> Option<Self>where
Self: TryFrom<T>,
fn checked_from<T>(t: T) -> Option<Self>where Self: TryFrom<T>,
§fn checked_into<T>(self) -> Option<T>where
Self: TryInto<T>,
fn checked_into<T>(self) -> Option<T>where Self: TryInto<T>,
§impl<T> Conv for T
impl<T> Conv for T
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<T> FmtForward for T
impl<T> FmtForward for T
§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where Self: Binary,
self
to use its Binary
implementation when Debug
-formatted.§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where Self: Display,
self
to use its Display
implementation when
Debug
-formatted.§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where Self: LowerExp,
self
to use its LowerExp
implementation when
Debug
-formatted.§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where Self: LowerHex,
self
to use its LowerHex
implementation when
Debug
-formatted.§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where Self: Octal,
self
to use its Octal
implementation when Debug
-formatted.§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where Self: Pointer,
self
to use its Pointer
implementation when
Debug
-formatted.§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where Self: UpperExp,
self
to use its UpperExp
implementation when
Debug
-formatted.§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where Self: UpperHex,
self
to use its UpperHex
implementation when
Debug
-formatted.§fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
fn fmt_list(self) -> FmtList<Self>where &'a Self: for<'a> IntoIterator,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> IsType<T> for T
impl<T> IsType<T> for T
§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere T: ?Sized,
§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere Self: Sized,
§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere R: 'a,
self
and passes that borrow into the pipe function. Read more§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere R: 'a,
self
and passes that borrow into the pipe function. Read more§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> Rwhere
Self: Borrow<B>,
B: 'a + ?Sized,
R: 'a,
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> Rwhere Self: Borrow<B>, B: 'a + ?Sized, R: 'a,
§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R
) -> Rwhere
Self: BorrowMut<B>,
B: 'a + ?Sized,
R: 'a,
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R ) -> Rwhere Self: BorrowMut<B>, B: 'a + ?Sized, R: 'a,
§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> Rwhere
Self: AsRef<U>,
U: 'a + ?Sized,
R: 'a,
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> Rwhere Self: AsRef<U>, U: 'a + ?Sized, R: 'a,
self
, then passes self.as_ref()
into the pipe function.§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> Rwhere
Self: AsMut<U>,
U: 'a + ?Sized,
R: 'a,
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> Rwhere Self: AsMut<U>, U: 'a + ?Sized, R: 'a,
self
, then passes self.as_mut()
into the pipe
function.§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> SaturatedConversion for T
impl<T> SaturatedConversion for T
§fn saturated_from<T>(t: T) -> Selfwhere
Self: UniqueSaturatedFrom<T>,
fn saturated_from<T>(t: T) -> Selfwhere Self: UniqueSaturatedFrom<T>,
§fn saturated_into<T>(self) -> Twhere
Self: UniqueSaturatedInto<T>,
fn saturated_into<T>(self) -> Twhere Self: UniqueSaturatedInto<T>,
T
. Read more§impl<T0, T1, E, TRewriter> SemanticRewriter<(T0, T1), E> for TRewriterwhere
TRewriter: SemanticRewriter<T0, E> + SemanticRewriter<T1, E>,
impl<T0, T1, E, TRewriter> SemanticRewriter<(T0, T1), E> for TRewriterwhere TRewriter: SemanticRewriter<T0, E> + SemanticRewriter<T1, E>,
§impl<T, E, TRewriter> SemanticRewriter<Box<T, Global>, E> for TRewriterwhere
T: Clone,
TRewriter: SemanticRewriter<T, E>,
impl<T, E, TRewriter> SemanticRewriter<Box<T, Global>, E> for TRewriterwhere T: Clone, TRewriter: SemanticRewriter<T, E>,
§impl<K, V, E, TRewriter> SemanticRewriter<HashMap<K, V, RandomState>, E> for TRewriterwhere
K: Eq + Hash,
TRewriter: SemanticRewriter<K, E> + SemanticRewriter<V, E>,
impl<K, V, E, TRewriter> SemanticRewriter<HashMap<K, V, RandomState>, E> for TRewriterwhere K: Eq + Hash, TRewriter: SemanticRewriter<K, E> + SemanticRewriter<V, E>,
fn rewrite( &mut self, value: HashMap<K, V, RandomState> ) -> Result<HashMap<K, V, RandomState>, E>
§impl<T, E, TRewriter> SemanticRewriter<Option<T>, E> for TRewriterwhere
TRewriter: SemanticRewriter<T, E>,
impl<T, E, TRewriter> SemanticRewriter<Option<T>, E> for TRewriterwhere TRewriter: SemanticRewriter<T, E>,
§impl<T, E, TRewriter, E2> SemanticRewriter<Result<T, E2>, E> for TRewriterwhere
TRewriter: SemanticRewriter<T, E>,
impl<T, E, TRewriter, E2> SemanticRewriter<Result<T, E2>, E> for TRewriterwhere TRewriter: SemanticRewriter<T, E>,
§impl<T, E, TRewriter> SemanticRewriter<Vec<T, Global>, E> for TRewriterwhere
TRewriter: SemanticRewriter<T, E>,
impl<T, E, TRewriter> SemanticRewriter<Vec<T, Global>, E> for TRewriterwhere TRewriter: SemanticRewriter<T, E>,
§impl<T, E, TRewriter> SemanticRewriter<VecDeque<T, Global>, E> for TRewriterwhere
TRewriter: SemanticRewriter<T, E>,
impl<T, E, TRewriter> SemanticRewriter<VecDeque<T, Global>, E> for TRewriterwhere TRewriter: SemanticRewriter<T, E>,
§impl<T> Tap for T
impl<T> Tap for T
§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Selfwhere
Self: Borrow<B>,
B: ?Sized,
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Selfwhere Self: Borrow<B>, B: ?Sized,
Borrow<B>
of a value. Read more§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere
Self: BorrowMut<B>,
B: ?Sized,
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere Self: BorrowMut<B>, B: ?Sized,
BorrowMut<B>
of a value. Read more§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Selfwhere
Self: AsRef<R>,
R: ?Sized,
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Selfwhere Self: AsRef<R>, R: ?Sized,
AsRef<R>
view of a value. Read more§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere
Self: AsMut<R>,
R: ?Sized,
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere Self: AsMut<R>, R: ?Sized,
AsMut<R>
view of a value. Read more§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Selfwhere
Self: Deref<Target = T>,
T: ?Sized,
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Selfwhere Self: Deref<Target = T>, T: ?Sized,
Deref::Target
of a value. Read more§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Selfwhere
Self: DerefMut<Target = T> + Deref,
T: ?Sized,
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Selfwhere Self: DerefMut<Target = T> + Deref, T: ?Sized,
Deref::Target
of a value. Read more§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
.tap()
only in debug builds, and is erased in release builds.§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
.tap_mut()
only in debug builds, and is erased in release
builds.§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Selfwhere
Self: Borrow<B>,
B: ?Sized,
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Selfwhere Self: Borrow<B>, B: ?Sized,
.tap_borrow()
only in debug builds, and is erased in release
builds.§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere
Self: BorrowMut<B>,
B: ?Sized,
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere Self: BorrowMut<B>, B: ?Sized,
.tap_borrow_mut()
only in debug builds, and is erased in release
builds.§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Selfwhere
Self: AsRef<R>,
R: ?Sized,
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Selfwhere Self: AsRef<R>, R: ?Sized,
.tap_ref()
only in debug builds, and is erased in release
builds.§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere
Self: AsMut<R>,
R: ?Sized,
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere Self: AsMut<R>, R: ?Sized,
.tap_ref_mut()
only in debug builds, and is erased in release
builds.§impl<T> TryConv for T
impl<T> TryConv for T
§impl<S, T> UncheckedInto<T> for Swhere
T: UncheckedFrom<S>,
impl<S, T> UncheckedInto<T> for Swhere T: UncheckedFrom<S>,
§fn unchecked_into(self) -> T
fn unchecked_into(self) -> T
unchecked_from
.§impl<T, S> UniqueSaturatedInto<T> for Swhere
T: Bounded,
S: TryInto<T>,
impl<T, S> UniqueSaturatedInto<T> for Swhere T: Bounded, S: TryInto<T>,
§fn unique_saturated_into(self) -> T
fn unique_saturated_into(self) -> T
T
.