Struct pallet_inv4::pallet::Pallet
source · pub struct Pallet<T>(PhantomData<T>);
Expand description
The Pallet
struct, the main type that implements traits and standalone
functions within the pallet.
Tuple Fields§
§0: PhantomData<T>
Implementations§
source§impl<T: Config> Pallet<T>
impl<T: Config> Pallet<T>
sourcepub(crate) fn inner_create_core(
origin: OriginFor<T>,
metadata: BoundedVec<u8, T::MaxMetadata>,
minimum_support: Perbill,
required_approval: Perbill,
creation_fee_asset: FeeAsset,
) -> DispatchResult
pub(crate) fn inner_create_core( origin: OriginFor<T>, metadata: BoundedVec<u8, T::MaxMetadata>, minimum_support: Perbill, required_approval: Perbill, creation_fee_asset: FeeAsset, ) -> DispatchResult
Inner function for the create_core call.
sourcepub(crate) fn inner_set_parameters(
origin: OriginFor<T>,
metadata: Option<BoundedVec<u8, T::MaxMetadata>>,
minimum_support: Option<Perbill>,
required_approval: Option<Perbill>,
frozen_tokens: Option<bool>,
) -> DispatchResult
pub(crate) fn inner_set_parameters( origin: OriginFor<T>, metadata: Option<BoundedVec<u8, T::MaxMetadata>>, minimum_support: Option<Perbill>, required_approval: Option<Perbill>, frozen_tokens: Option<bool>, ) -> DispatchResult
Inner function for the set_parameters call.
sourcepub fn is_asset_frozen(core_id: T::CoreId) -> Option<bool>
pub fn is_asset_frozen(core_id: T::CoreId) -> Option<bool>
Checks if the voting asset is frozen.
source§impl<T: Config> Pallet<T>
impl<T: Config> Pallet<T>
sourcepub fn lookup_core(core_id: T::CoreId) -> Option<T::AccountId>
pub fn lookup_core(core_id: T::CoreId) -> Option<T::AccountId>
Queries CoreStorage
to retrieve the AccountId of a core.
sourcepub fn lookup_address(
a: MultiAddress<T::AccountId, T::CoreId>,
) -> Option<T::AccountId>
pub fn lookup_address( a: MultiAddress<T::AccountId, T::CoreId>, ) -> Option<T::AccountId>
Matches MultiAddress
to allow for a MultiAddress::Index
containing a CoreId to be converted
to it’s derived AccountId.
source§impl<T: Config> Pallet<T>
impl<T: Config> Pallet<T>
sourcepub(crate) fn inner_token_mint(
origin: OriginFor<T>,
amount: BalanceOf<T>,
target: T::AccountId,
) -> DispatchResult
pub(crate) fn inner_token_mint( origin: OriginFor<T>, amount: BalanceOf<T>, target: T::AccountId, ) -> DispatchResult
Inner function for the token_mint call.
sourcepub(crate) fn inner_token_burn(
origin: OriginFor<T>,
amount: BalanceOf<T>,
target: T::AccountId,
) -> DispatchResult
pub(crate) fn inner_token_burn( origin: OriginFor<T>, amount: BalanceOf<T>, target: T::AccountId, ) -> DispatchResult
Inner function for the token_burn call.
sourcepub(crate) fn inner_operate_multisig(
caller: OriginFor<T>,
core_id: T::CoreId,
metadata: Option<BoundedVec<u8, T::MaxMetadata>>,
fee_asset: FeeAsset,
call: Box<<T as Config>::RuntimeCall>,
) -> DispatchResultWithPostInfo
pub(crate) fn inner_operate_multisig( caller: OriginFor<T>, core_id: T::CoreId, metadata: Option<BoundedVec<u8, T::MaxMetadata>>, fee_asset: FeeAsset, call: Box<<T as Config>::RuntimeCall>, ) -> DispatchResultWithPostInfo
Inner function for the operate_multisig call.
sourcepub(crate) fn inner_vote_multisig(
caller: OriginFor<T>,
core_id: T::CoreId,
call_hash: T::Hash,
aye: bool,
) -> DispatchResultWithPostInfo
pub(crate) fn inner_vote_multisig( caller: OriginFor<T>, core_id: T::CoreId, call_hash: T::Hash, aye: bool, ) -> DispatchResultWithPostInfo
Inner function for the vote_multisig call.
sourcepub(crate) fn inner_withdraw_vote_multisig(
caller: OriginFor<T>,
core_id: T::CoreId,
call_hash: T::Hash,
) -> DispatchResultWithPostInfo
pub(crate) fn inner_withdraw_vote_multisig( caller: OriginFor<T>, core_id: T::CoreId, call_hash: T::Hash, ) -> DispatchResultWithPostInfo
Inner function for the withdraw_token_multisig call.
sourcepub(crate) fn inner_cancel_multisig_proposal(
origin: OriginFor<T>,
call_hash: T::Hash,
) -> DispatchResultWithPostInfo
pub(crate) fn inner_cancel_multisig_proposal( origin: OriginFor<T>, call_hash: T::Hash, ) -> DispatchResultWithPostInfo
Inner function for the cancel_multisig_proposal call.
pub fn add_member(core_id: &T::CoreId, member: &T::AccountId)
pub fn remove_member(core_id: &T::CoreId, member: &T::AccountId)
source§impl<T: Config> Pallet<T>
impl<T: Config> Pallet<T>
sourcepub fn minimum_support_and_required_approval(
core_id: T::CoreId,
) -> Option<(Perbill, Perbill)>
pub fn minimum_support_and_required_approval( core_id: T::CoreId, ) -> Option<(Perbill, Perbill)>
Returns the minimum support and required approval thresholds of a core.
source§impl<T: Config> Pallet<T>
impl<T: Config> Pallet<T>
Dispatch functions
sourcepub fn create_core(
owner: OriginFor<T>,
metadata: BoundedVec<u8, T::MaxMetadata>,
minimum_support: Perbill,
required_approval: Perbill,
creation_fee_asset: FeeAsset,
) -> DispatchResultWithPostInfo
pub fn create_core( owner: OriginFor<T>, metadata: BoundedVec<u8, T::MaxMetadata>, minimum_support: Perbill, required_approval: Perbill, creation_fee_asset: FeeAsset, ) -> DispatchResultWithPostInfo
Create a new core
metadata
: Arbitrary byte vec to be attached to the core infominimum_support
: Minimum amount of positive votes out of total token supply required to approve a proposalrequired_approval
: Minimum amount of positive votes out of current positive + negative votes required to approve a proposalcreation_fee_asset
: Token to be used to pay the core creation fee
sourcepub fn token_mint(
origin: OriginFor<T>,
amount: BalanceOf<T>,
target: T::AccountId,
) -> DispatchResult
pub fn token_mint( origin: OriginFor<T>, amount: BalanceOf<T>, target: T::AccountId, ) -> DispatchResult
Mint the core’s voting token to a target (called by a core origin)
amount
: Balance amounttarget
: Account receiving the minted tokens
sourcepub fn token_burn(
origin: OriginFor<T>,
amount: BalanceOf<T>,
target: T::AccountId,
) -> DispatchResult
pub fn token_burn( origin: OriginFor<T>, amount: BalanceOf<T>, target: T::AccountId, ) -> DispatchResult
Burn the core’s voting token from a target (called by a core origin)
amount
: Balance amounttarget
: Account having tokens burned
sourcepub fn operate_multisig(
caller: OriginFor<T>,
core_id: T::CoreId,
metadata: Option<BoundedVec<u8, T::MaxMetadata>>,
fee_asset: FeeAsset,
call: Box<<T as Config>::RuntimeCall>,
) -> DispatchResultWithPostInfo
pub fn operate_multisig( caller: OriginFor<T>, core_id: T::CoreId, metadata: Option<BoundedVec<u8, T::MaxMetadata>>, fee_asset: FeeAsset, call: Box<<T as Config>::RuntimeCall>, ) -> DispatchResultWithPostInfo
Create a new multisig proposal, auto-executing if caller passes execution threshold requirements Fees are calculated using the length of the metadata and the call The proposed call’s weight is used internally to charge the multisig instead of the user proposing the call
core_id
: Id of the core to propose the call inmetadata
: Arbitrary byte vec to be attached to the proposalfee_asset
: Token to be used by the multisig to pay for call feescall
: The actual call to be proposed
sourcepub fn vote_multisig(
caller: OriginFor<T>,
core_id: T::CoreId,
call_hash: T::Hash,
aye: bool,
) -> DispatchResultWithPostInfo
pub fn vote_multisig( caller: OriginFor<T>, core_id: T::CoreId, call_hash: T::Hash, aye: bool, ) -> DispatchResultWithPostInfo
Vote on an existing multisig proposal, auto-executing if caller puts vote tally past execution threshold requirements
core_id
: Id of the core where the proposal iscall_hash
: Hash of the call identifying the proposalaye
: Wheter or not to vote positively
sourcepub fn withdraw_vote_multisig(
caller: OriginFor<T>,
core_id: T::CoreId,
call_hash: T::Hash,
) -> DispatchResultWithPostInfo
pub fn withdraw_vote_multisig( caller: OriginFor<T>, core_id: T::CoreId, call_hash: T::Hash, ) -> DispatchResultWithPostInfo
Remove caller’s vote from an existing multisig proposal
core_id
: Id of the core where the proposal iscall_hash
: Hash of the call identifying the proposal
sourcepub fn cancel_multisig_proposal(
caller: OriginFor<T>,
call_hash: T::Hash,
) -> DispatchResultWithPostInfo
pub fn cancel_multisig_proposal( caller: OriginFor<T>, call_hash: T::Hash, ) -> DispatchResultWithPostInfo
Cancel an existing multisig proposal (called by a core origin)
call_hash
: Hash of the call identifying the proposal
sourcepub fn set_parameters(
origin: OriginFor<T>,
metadata: Option<BoundedVec<u8, T::MaxMetadata>>,
minimum_support: Option<Perbill>,
required_approval: Option<Perbill>,
frozen_tokens: Option<bool>,
) -> DispatchResult
pub fn set_parameters( origin: OriginFor<T>, metadata: Option<BoundedVec<u8, T::MaxMetadata>>, minimum_support: Option<Perbill>, required_approval: Option<Perbill>, frozen_tokens: Option<bool>, ) -> DispatchResult
Change core parameters incl. voting thresholds and token freeze state (called by a core origin)
metadata
: Arbitrary byte vec to be attached to the core infominimum_support
: Minimum amount of positive votes out of total token supply required to approve a proposalrequired_approval
: Minimum amount of positive votes out of current positive + negative votes required to approve a proposalfrozen_tokens
: Wheter or not the core’s voting token should be transferable by the holders
source§impl<T: Config> Pallet<T>
impl<T: Config> Pallet<T>
sourcepub fn next_core_id() -> T::CoreId
pub fn next_core_id() -> T::CoreId
An auto-generated getter for NextCoreId
.
source§impl<T: Config> Pallet<T>
impl<T: Config> Pallet<T>
sourcepub fn core_storage<KArg>(k: KArg) -> Option<CoreInfoOf<T>>where
KArg: EncodeLike<T::CoreId>,
pub fn core_storage<KArg>(k: KArg) -> Option<CoreInfoOf<T>>where
KArg: EncodeLike<T::CoreId>,
An auto-generated getter for CoreStorage
.
source§impl<T: Config> Pallet<T>
impl<T: Config> Pallet<T>
sourcepub fn core_by_account<KArg>(k: KArg) -> Option<T::CoreId>where
KArg: EncodeLike<T::AccountId>,
pub fn core_by_account<KArg>(k: KArg) -> Option<T::CoreId>where
KArg: EncodeLike<T::AccountId>,
An auto-generated getter for CoreByAccount
.
source§impl<T: Config> Pallet<T>
impl<T: Config> Pallet<T>
sourcepub fn core_members<KArg1, KArg2>(k1: KArg1, k2: KArg2) -> Option<()>where
KArg1: EncodeLike<T::CoreId>,
KArg2: EncodeLike<T::AccountId>,
pub fn core_members<KArg1, KArg2>(k1: KArg1, k2: KArg2) -> Option<()>where
KArg1: EncodeLike<T::CoreId>,
KArg2: EncodeLike<T::AccountId>,
An auto-generated getter for CoreMembers
.
Trait Implementations§
source§impl<T: Config> BeforeAllRuntimeMigrations for Pallet<T>
impl<T: Config> BeforeAllRuntimeMigrations for Pallet<T>
source§fn before_all_runtime_migrations() -> Weight
fn before_all_runtime_migrations() -> Weight
source§impl<T: Config> CoreAccountDerivation<T> for Pallet<T>
impl<T: Config> CoreAccountDerivation<T> for Pallet<T>
source§fn derive_core_account(core_id: T::CoreId) -> T::AccountId
fn derive_core_account(core_id: T::CoreId) -> T::AccountId
HashedDescription of the core location from the perspective of a sibling chain. This derivation allows the local account address to match the account address in other parachains. Reference: https://github.com/paritytech/polkadot-sdk/blob/master/polkadot/xcm/xcm-builder/src/location_conversion.rs
source§fn core_location(core_id: T::CoreId) -> Junctions
fn core_location(core_id: T::CoreId) -> Junctions
Core location is defined as a plurality within the parachain.
source§impl<T: Config> CustomPolling<Tally<T>> for Pallet<T>
impl<T: Config> CustomPolling<Tally<T>> for Pallet<T>
type Index = <T as Config>::Hash
type Votes = <<T as Config>::Currency as Currency<<T as Config>::AccountId>>::Balance
type Moment = <<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number
type Class = <T as Config>::CoreId
fn classes() -> Vec<Self::Class>
fn access_poll<R>( class: Self::Class, index: Self::Index, f: impl FnOnce(PollStatus<&mut Tally<T>, BlockNumberFor<T>, T::CoreId>) -> R, ) -> R
fn try_access_poll<R>( class: Self::Class, index: Self::Index, f: impl FnOnce(PollStatus<&mut Tally<T>, BlockNumberFor<T>, T::CoreId>) -> Result<R, DispatchError>, ) -> Result<R, DispatchError>
source§impl<T: Config> GetStorageVersion for Pallet<T>
impl<T: Config> GetStorageVersion for Pallet<T>
§type CurrentStorageVersion = StorageVersion
type CurrentStorageVersion = StorageVersion
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>
§fn on_initialize(_n: BlockNumber) -> Weight
fn on_initialize(_n: BlockNumber) -> Weight
§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
Hooks::on_finalize
]). Read more§fn on_runtime_upgrade() -> Weight
fn on_runtime_upgrade() -> Weight
§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 for Pallet<T>
impl<T> PartialEq for Pallet<T>
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> Freeze for Pallet<T>
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>,
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)§impl<T> Conv for T
impl<T> Conv for T
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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 Q
impl<Q, K> Equivalent<K> for Q
§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>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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> IsType<T> for T
impl<T> IsType<T> for T
§impl<T, Outer> IsWrappedBy<Outer> for T
impl<T, Outer> IsWrappedBy<Outer> 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) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
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) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
self
, then passes self.as_mut()
into the pipe
function.§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
self
, then passes self.deref()
into the pipe function.§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)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Borrow<B>
of a value. Read more§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
BorrowMut<B>
of a value. Read more§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
AsRef<R>
view of a value. Read more§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
AsMut<R>
view of a value. Read more§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Deref::Target
of a value. Read more§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
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)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
.tap_borrow()
only in debug builds, and is erased in release
builds.§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
.tap_borrow_mut()
only in debug builds, and is erased in release
builds.§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
.tap_ref()
only in debug builds, and is erased in release
builds.§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
.tap_ref_mut()
only in debug builds, and is erased in release
builds.§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
.tap_deref()
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 S
impl<T, S> UniqueSaturatedInto<T> for S
§fn unique_saturated_into(self) -> T
fn unique_saturated_into(self) -> T
T
.