Struct pallet_bitcoin_vaults::pallet::Pallet
source · pub struct Pallet<T>(_);
Expand description
The pallet implementing the on-chain logic.
Implementations§
source§impl<T: Config> Pallet<T>
impl<T: Config> Pallet<T>
sourcepub fn do_remove_xpub(who: T::AccountId) -> DispatchResult
pub fn do_remove_xpub(who: T::AccountId) -> DispatchResult
Use with caution
pub fn do_insert_vault(vault: Vault<T>) -> DispatchResult
pub fn do_remove_vault( owner: T::AccountId, vault_id: [u8; 32] ) -> DispatchResult
pub fn do_remove_proposal(proposal_id: [u8; 32]) -> DispatchResult
pub fn do_propose(proposal: Proposal<T>) -> DispatchResult
pub fn do_save_psbt( signer: T::AccountId, proposal_id: [u8; 32], signature_payload: BoundedVec<u8, T::PSBTMaxLen> ) -> DispatchResult
pub fn do_finalize_psbt( signer: T::AccountId, proposal_id: [u8; 32], broadcast: bool ) -> DispatchResult
pub fn do_create_proof( signer: T::AccountId, vault_id: [u8; 32], message: Description<T>, psbt: PSBT<T> ) -> DispatchResult
pub fn do_save_proof_psbt( signer: T::AccountId, vault_id: [u8; 32], psbt: PSBT<T> ) -> DispatchResult
pub fn do_finalize_proof( signer: T::AccountId, vault_id: [u8; 32], final_proof: PSBT<T> ) -> DispatchResult
pub fn do_remove_proof(vault_id: [u8; 32])
pub fn get_xpub_status(who: T::AccountId, xpub_hash: [u8; 32]) -> XpubStatus
pub fn vault_comprobations( vault_id: [u8; 32], signer: &T::AccountId ) -> DispatchResult
pub fn do_insert_descriptors( vault_id: [u8; 32], descriptors: Descriptors<T::OutputDescriptorMaxLen>, status: BDKStatus<T::VaultDescriptionMaxLen> ) -> DispatchResult
pub fn do_insert_psbt( proposal_id: [u8; 32], psbt: BoundedVec<u8, T::PSBTMaxLen>, status: BDKStatus<T::VaultDescriptionMaxLen> ) -> DispatchResult
pub fn do_insert_tx_id( proposal_id: [u8; 32], tx_id: Option<BoundedVec<u8, T::VaultDescriptionMaxLen>>, status: BDKStatus<T::VaultDescriptionMaxLen> ) -> DispatchResult
pub fn get_pending_vaults() -> Vec<[u8; 32]>
pub fn get_pending_proposals() -> Vec<[u8; 32]>
pub fn get_accounts_xpubs( accounts: Vec<T::AccountId> ) -> Result<Vec<Vec<u8>>, DispatchError>
pub fn get_proposals_to_finalize() -> Vec<[u8; 32]>
pub fn extract_json_str_by_name( tuple: Vec<(Vec<char>, JsonValue)>, s: &str ) -> Option<Vec<u8>>
pub fn bdk_gen_vault( vault_id: [u8; 32] ) -> Result<(Vec<u8>, Vec<u8>), OffchainStatus>
pub fn gen_vaults_payload_by_bulk( pending_vaults: Vec<[u8; 32]> ) -> Vec<SingleVaultPayload>
pub fn gen_proposal_json_body( proposal_id: [u8; 32] ) -> Result<Vec<u8>, OffchainStatus>
pub fn bdk_gen_proposal( proposal_id: [u8; 32], api_endpoint: Vec<u8>, json_builder: &dyn Fn([u8; 32]) -> Result<Vec<u8>, OffchainStatus> ) -> Result<Vec<u8>, OffchainStatus>
pub fn gen_proposals_payload_by_bulk( pending_proposals: Vec<[u8; 32]>, api_endpoint: Vec<u8>, json_builder: &dyn Fn([u8; 32]) -> Result<Vec<u8>, OffchainStatus> ) -> Vec<SingleProposalPayload>
pub fn gen_finalize_json_body( proposal_id: [u8; 32] ) -> Result<Vec<u8>, OffchainStatus>
pub fn send_ocw_insert_descriptors( generated_vaults: Vec<SingleVaultPayload>, signer: &Signer<T, T::AuthorityId> )
pub fn send_ocw_insert_psbts( generated_proposals: Vec<SingleProposalPayload>, signer: &Signer<T, T::AuthorityId> )
pub fn send_ocw_finalize_psbts( generated_proposals: Vec<SingleProposalPayload>, signer: &Signer<T, T::AuthorityId> )
pub fn chars_to_bytes(v: Vec<char>) -> Vec<u8> ⓘ
source§impl<T: Config> Pallet<T>
impl<T: Config> Pallet<T>
sourcepub fn set_xpub(
origin: OriginFor<T>,
xpub: BoundedVec<u8, T::XPubLen>
) -> DispatchResult
pub fn set_xpub( origin: OriginFor<T>, xpub: BoundedVec<u8, T::XPubLen> ) -> DispatchResult
XPub insertion
This extrinsic inserts a user-defined xpub as well as in the pallet storage.
Parameters:
xpub
: Extended public key, it can be sent with or without fingerprint/derivation path
Considerations
- The origin must be Signed and the sender must have sufficient funds free for the transaction fee.
- This extrinsic cannot handle a xpub update (yet). if it needs to be updated, remove it first and insert a new one.
sourcepub fn remove_xpub(origin: OriginFor<T>) -> DispatchResult
pub fn remove_xpub(origin: OriginFor<T>) -> DispatchResult
Xpub removal
Removes the linked xpub from the account which signs the transaction. The xpub will be removed from both the pallet storage and identity registration.
This tx does not takes any parameters.
sourcepub fn create_vault(
origin: OriginFor<T>,
threshold: u32,
description: BoundedVec<u8, T::VaultDescriptionMaxLen>,
include_owner_as_cosigner: bool,
cosigners: BoundedVec<T::AccountId, T::MaxCosignersPerVault>
) -> DispatchResult
pub fn create_vault( origin: OriginFor<T>, threshold: u32, description: BoundedVec<u8, T::VaultDescriptionMaxLen>, include_owner_as_cosigner: bool, cosigners: BoundedVec<T::AccountId, T::MaxCosignersPerVault> ) -> DispatchResult
Vault insertion
Inserts the vault on chain. Meant to be used by an offchain worker.
Parameters:
threshold
: The number of signatures needed for a proposal to be approved/finalizeddescription
: A small definition. What will the vault be used for?include_owner_as_cosigner
: Add automatically the owner as cosignercosigners
: The other accounts that will participate in vault proposals.
Considerations
- Do not include the vault owner on the
cosigners
list.
sourcepub fn remove_vault(origin: OriginFor<T>, vault_id: [u8; 32]) -> DispatchResult
pub fn remove_vault(origin: OriginFor<T>, vault_id: [u8; 32]) -> DispatchResult
Vault removal
Tries to remove vault and all its proposals, only the owner can call this extrinsic.
Parameters:
vault_id
: the vault to be removed with all its proposals
Considerations:
- Only the vault owner can perform this extrinsic
sourcepub fn propose(
origin: OriginFor<T>,
vault_id: [u8; 32],
recipient_address: BoundedVec<u8, T::XPubLen>,
amount_in_sats: u64,
description: BoundedVec<u8, T::VaultDescriptionMaxLen>
) -> DispatchResult
pub fn propose( origin: OriginFor<T>, vault_id: [u8; 32], recipient_address: BoundedVec<u8, T::XPubLen>, amount_in_sats: u64, description: BoundedVec<u8, T::VaultDescriptionMaxLen> ) -> DispatchResult
Vault transaction proposal
Inserts a proposal on the specified vault.
Parameters:
vault_id
: the vault identifier in which the proposal will be insertedrecipient_address
: Mainnet address to which the funds will be sendamount_in_sats
: Amount to send in satoshis.description
: The reason for the proposal, why do you are proposing this?.
Considerations
- Please ensure the recipient address is a valid mainnet address.
sourcepub fn remove_proposal(
origin: OriginFor<T>,
proposal_id: [u8; 32]
) -> DispatchResult
pub fn remove_proposal( origin: OriginFor<T>, proposal_id: [u8; 32] ) -> DispatchResult
Proposal removal
Tries to remove a specified proposal. Only the user who created the proposal can remove it.
Parameters:
proposal_id
: the proposal identifier
sourcepub fn set_bdk_url(
origin: OriginFor<T>,
new_url: BoundedVec<u8, ConstU32<32>>
) -> DispatchResult
pub fn set_bdk_url( origin: OriginFor<T>, new_url: BoundedVec<u8, ConstU32<32>> ) -> DispatchResult
BDK URL insertion
Changes the BDK-services endpoint, useful for pointing to the btc mainnet or testnet
Parameters:
new_url
: The new endpoint to which all the bdk related requests will be sent.
Considerations
- Ensure the new url is valid.
- The url has a maximum length of 32 bytes
sourcepub fn save_psbt(
origin: OriginFor<T>,
proposal_id: [u8; 32],
signature_payload: BoundedVec<u8, T::PSBTMaxLen>
) -> DispatchResult
pub fn save_psbt( origin: OriginFor<T>, proposal_id: [u8; 32], signature_payload: BoundedVec<u8, T::PSBTMaxLen> ) -> DispatchResult
PSBT signature insertion
Stores the signature for a PSBT proposal
Parameters:
proposal_id
: the proposal identifiersignature_payload
: a blob of psbt bytes, resulting from a external wallet
Considerations
- If successful, this process cannot be undone
- A user can only sign a proposal once
sourcepub fn finalize_psbt(
origin: OriginFor<T>,
proposal_id: [u8; 32],
broadcast: bool
) -> DispatchResult
pub fn finalize_psbt( origin: OriginFor<T>, proposal_id: [u8; 32], broadcast: bool ) -> DispatchResult
Finalize PSBT
Queries a proposal to be finalized generating a tx_id in the process, it can also be broadcasted if specified.
Parameters:
proposal_id
: the proposal identifierbroadcast
: A boolean flag
Considerations
- If successful, this process cannot be undone
- The proposal must have a valid PSBT
- Any vault member can perform this extrinsic
sourcepub fn broadcast_psbt(
origin: OriginFor<T>,
proposal_id: [u8; 32]
) -> DispatchResult
pub fn broadcast_psbt( origin: OriginFor<T>, proposal_id: [u8; 32] ) -> DispatchResult
Broadcast PSBT
Queries a proposal to be broadcasted in case it wasn’t on the finalization step.
Parameters:
proposal_id
: the vault identifier in which the proposal will be inserted
Considerations
- If successful, this process cannot be undone
- The proposal must be finalized already
- Any vault member can perform this extrinsic
sourcepub fn create_proof(
origin: OriginFor<T>,
vault_id: [u8; 32],
message: Description<T>,
psbt: PSBT<T>
) -> DispatchResult
pub fn create_proof( origin: OriginFor<T>, vault_id: [u8; 32], message: Description<T>, psbt: PSBT<T> ) -> DispatchResult
Create Proof of Reserve
Stores a PoR for a defined vault.
Parameters:
vault_id
: the vault identifier in which the proof will be insertedmessage
: the message to be taken into account to generate the PoR PSBTpsbt
: the psbt generated from bdk
Considerations:
- Any vault member can perform this extrinsic
- A vault can only have a PoR at a time.
sourcepub fn save_proof_psbt(
origin: OriginFor<T>,
vault_id: [u8; 32],
psbt: PSBT<T>
) -> DispatchResult
pub fn save_proof_psbt( origin: OriginFor<T>, vault_id: [u8; 32], psbt: PSBT<T> ) -> DispatchResult
Save Proof of reserve PSBT
Updates the PoR with a new PSBT
Parameters
vault_id
: the vault identifier in which the proof ispsbt
: the new psbt to insert, the signer will be linked to it.
Considerations:
- Any vault member can perform this extrinsic
- A vault signer can only sabe its PSBT once.
sourcepub fn finalize_proof(
origin: OriginFor<T>,
vault_id: [u8; 32],
psbt: PSBT<T>
) -> DispatchResult
pub fn finalize_proof( origin: OriginFor<T>, vault_id: [u8; 32], psbt: PSBT<T> ) -> DispatchResult
Finalize proof of reserve
Updates the PoR with the final PSBT
Parameters
vault_id
: the vault identifier in which the proof ispsbt
: the new psbt to insert, the signer will be linked to it.
Considerations:
- Any vault member can perform this extrinsic
- A vault signer can only sabe its PSBT once.
sourcepub fn kill_storage(origin: OriginFor<T>) -> DispatchResult
pub fn kill_storage(origin: OriginFor<T>) -> DispatchResult
Kill almost all storage
Use with caution!
Can only be called by root and removes All vaults and proposals
sourcepub fn ocw_insert_descriptors(
origin: OriginFor<T>,
payload: VaultsPayload<T::Public>,
_signature: T::Signature
) -> DispatchResult
pub fn ocw_insert_descriptors( origin: OriginFor<T>, payload: VaultsPayload<T::Public>, _signature: T::Signature ) -> DispatchResult
Extrinsic to insert a valid vault descriptor
Meant to be unsigned with signed payload and used by an offchain worker
sourcepub fn ocw_insert_psbts(
origin: OriginFor<T>,
payload: ProposalsPayload<T::Public>,
_signature: T::Signature
) -> DispatchResult
pub fn ocw_insert_psbts( origin: OriginFor<T>, payload: ProposalsPayload<T::Public>, _signature: T::Signature ) -> DispatchResult
Extrinsic to insert a valid proposal PSBT
Meant to be unsigned with signed payload and used by an offchain worker
sourcepub fn ocw_finalize_psbts(
origin: OriginFor<T>,
payload: ProposalsPayload<T::Public>,
_signature: T::Signature
) -> DispatchResult
pub fn ocw_finalize_psbts( origin: OriginFor<T>, payload: ProposalsPayload<T::Public>, _signature: T::Signature ) -> DispatchResult
Extrinsic to insert a valid proposal TX_ID
Meant to be unsigned with signed payload and used by an offchain worker
source§impl<T: Config> Pallet<T>
impl<T: Config> Pallet<T>
sourcepub fn xpubs_by_owner<KArg>(k: KArg) -> Option<[u8; 32]>where
KArg: EncodeLike<T::AccountId>,
pub fn xpubs_by_owner<KArg>(k: KArg) -> Option<[u8; 32]>where KArg: EncodeLike<T::AccountId>,
Keeps track of what accounts own what xpub.
source§impl<T: Config> Pallet<T>
impl<T: Config> Pallet<T>
pub fn proposals_by_vault<KArg>( k: KArg ) -> BoundedVec<[u8; 32], T::MaxProposalsPerVault>where KArg: EncodeLike<[u8; 32]>,
source§impl<T: Config> Pallet<T>
impl<T: Config> Pallet<T>
sourcepub fn vaults_by_signer<KArg>(
k: KArg
) -> BoundedVec<[u8; 32], T::MaxVaultsPerUser>where
KArg: EncodeLike<T::AccountId>,
pub fn vaults_by_signer<KArg>( k: KArg ) -> BoundedVec<[u8; 32], T::MaxVaultsPerUser>where KArg: EncodeLike<T::AccountId>,
Keeps track of what accounts own what xpub.
source§impl<T: Config> Pallet<T>
impl<T: Config> Pallet<T>
sourcepub fn proof_of_reserve<KArg>(k: KArg) -> Option<ProofOfReserve<T>>where
KArg: EncodeLike<[u8; 32]>,
pub fn proof_of_reserve<KArg>(k: KArg) -> Option<ProofOfReserve<T>>where KArg: EncodeLike<[u8; 32]>,
Stores vaults proof-of-reserve
Trait Implementations§
source§impl<T: Config> BlockNumberProvider for Pallet<T>
impl<T: Config> BlockNumberProvider for Pallet<T>
§type BlockNumber = <T as Config>::BlockNumber
type BlockNumber = <T as Config>::BlockNumber
BlockNumber
to provide.source§fn current_block_number() -> Self::BlockNumber
fn current_block_number() -> Self::BlockNumber
source§impl<T: Config> GetStorageVersion for Pallet<T>
impl<T: Config> GetStorageVersion for Pallet<T>
source§fn current_storage_version() -> StorageVersion
fn current_storage_version() -> StorageVersion
source§fn on_chain_storage_version() -> StorageVersion
fn on_chain_storage_version() -> StorageVersion
source§impl<T: Config> Hooks<<T as Config>::BlockNumber> for Pallet<T>
impl<T: Config> Hooks<<T as Config>::BlockNumber> for Pallet<T>
source§fn offchain_worker(_block_number: T::BlockNumber)
fn offchain_worker(_block_number: T::BlockNumber)
Offchain Worker entry point.
By implementing fn offchain_worker
you declare a new offchain worker.
This function will be called when the node is fully synced and a new best block is
successfully imported.
Note that it’s not guaranteed for offchain workers to run on EVERY block, there might
be cases where some blocks are skipped, or for some the worker runs twice (re-orgs),
so the code should be able to handle that.
§fn on_finalize(_n: BlockNumber)
fn on_finalize(_n: BlockNumber)
§fn on_idle(_n: BlockNumber, _remaining_weight: Weight) -> Weight
fn on_idle(_n: BlockNumber, _remaining_weight: Weight) -> Weight
on_finalize
).
Implement to have something happen using the remaining weight.
Will not fire if the remaining weight is 0.
Return the weight used, the hook will subtract it from current weight used
and pass the result to the next on_idle
hook if it exists.§fn on_initialize(_n: BlockNumber) -> Weight
fn on_initialize(_n: BlockNumber) -> Weight
§fn on_runtime_upgrade() -> Weight
fn on_runtime_upgrade() -> Weight
§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()
source§impl<T: Config> OffchainWorker<<T as Config>::BlockNumber> for Pallet<T>
impl<T: Config> OffchainWorker<<T as Config>::BlockNumber> for Pallet<T>
source§fn offchain_worker(n: <T as Config>::BlockNumber)
fn offchain_worker(n: <T as Config>::BlockNumber)
source§impl<T: Config> OnFinalize<<T as Config>::BlockNumber> for Pallet<T>
impl<T: Config> OnFinalize<<T as Config>::BlockNumber> for Pallet<T>
source§fn on_finalize(n: <T as Config>::BlockNumber)
fn on_finalize(n: <T as Config>::BlockNumber)
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>::BlockNumber> for Pallet<T>
impl<T: Config> OnIdle<<T as Config>::BlockNumber> for Pallet<T>
source§fn on_idle(n: <T as Config>::BlockNumber, remaining_weight: Weight) -> Weight
fn on_idle(n: <T as Config>::BlockNumber, remaining_weight: Weight) -> Weight
remaining_weight
to make sure it is high enough to allow for
your pallet’s extra computation. Read moresource§impl<T: Config> OnInitialize<<T as Config>::BlockNumber> for Pallet<T>
impl<T: Config> OnInitialize<<T as Config>::BlockNumber> for Pallet<T>
source§fn on_initialize(n: <T as Config>::BlockNumber) -> Weight
fn on_initialize(n: <T as Config>::BlockNumber) -> Weight
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
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> 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
§fn pre_dispatch(call: &Self::Call) -> Result<(), TransactionValidityError>
fn pre_dispatch(call: &Self::Call) -> Result<(), TransactionValidityError>
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
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere T: Any,
§fn into_any(self: Box<T, Global>) -> Box<dyn Any, Global>
fn into_any(self: Box<T, Global>) -> Box<dyn Any, Global>
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
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.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<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,
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§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> PalletVersionToStorageVersionHelper for Twhere
T: GetStorageVersion + PalletInfoAccess,
impl<T> PalletVersionToStorageVersionHelper for Twhere T: GetStorageVersion + PalletInfoAccess,
§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<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
.