Struct pallet_uniques::pallet::Pallet [−][src]
pub struct Pallet<T, I = ()>(_);
Expand description
The pallet implementing the on-chain logic.
Implementations
pub fn create(
origin: OriginFor<T>,
class: T::ClassId,
admin: <T::Lookup as StaticLookup>::Source
) -> DispatchResult
pub fn create(
origin: OriginFor<T>,
class: T::ClassId,
admin: <T::Lookup as StaticLookup>::Source
) -> DispatchResult
Issue a new class of non-fungible assets from a public origin.
This new asset class has no assets initially and its owner is the origin.
The origin must be Signed and the sender must have sufficient funds free.
AssetDeposit
funds of sender are reserved.
Parameters:
class
: The identifier of the new asset class. This must not be currently in use.admin
: The admin of this class of assets. The admin is the initial address of each member of the asset class’s admin team.
Emits Created
event when successful.
Weight: O(1)
pub fn force_create(
origin: OriginFor<T>,
class: T::ClassId,
owner: <T::Lookup as StaticLookup>::Source,
free_holding: bool
) -> DispatchResult
pub fn force_create(
origin: OriginFor<T>,
class: T::ClassId,
owner: <T::Lookup as StaticLookup>::Source,
free_holding: bool
) -> DispatchResult
Issue a new class of non-fungible assets from a privileged origin.
This new asset class has no assets initially.
The origin must conform to ForceOrigin
.
Unlike create
, no funds are reserved.
class
: The identifier of the new asset. This must not be currently in use.owner
: The owner of this class of assets. The owner has full superuser permissions over this asset, but may later change and configure the permissions usingtransfer_ownership
andset_team
.
Emits ForceCreated
event when successful.
Weight: O(1)
pub fn destroy(
origin: OriginFor<T>,
class: T::ClassId,
witness: DestroyWitness
) -> DispatchResult
pub fn destroy(
origin: OriginFor<T>,
class: T::ClassId,
witness: DestroyWitness
) -> DispatchResult
Destroy a class of fungible assets.
The origin must conform to ForceOrigin
or must be Signed
and the sender must be the
owner of the asset class
.
class
: The identifier of the asset class to be destroyed.witness
: Information on the instances minted in the asset class. This must be correct.
Emits Destroyed
event when successful.
Weight: O(n + m)
where:
n = witness.instances
m = witness.instance_metadatas
a = witness.attributes
pub fn mint(
origin: OriginFor<T>,
class: T::ClassId,
instance: T::InstanceId,
owner: <T::Lookup as StaticLookup>::Source
) -> DispatchResult
pub fn mint(
origin: OriginFor<T>,
class: T::ClassId,
instance: T::InstanceId,
owner: <T::Lookup as StaticLookup>::Source
) -> DispatchResult
Mint an asset instance of a particular class.
The origin must be Signed and the sender must be the Issuer of the asset class
.
class
: The class of the asset to be minted.instance
: The instance value of the asset to be minted.beneficiary
: The initial owner of the minted asset.
Emits Issued
event when successful.
Weight: O(1)
pub fn burn(
origin: OriginFor<T>,
class: T::ClassId,
instance: T::InstanceId,
check_owner: Option<<T::Lookup as StaticLookup>::Source>
) -> DispatchResult
pub fn burn(
origin: OriginFor<T>,
class: T::ClassId,
instance: T::InstanceId,
check_owner: Option<<T::Lookup as StaticLookup>::Source>
) -> DispatchResult
Destroy a single asset instance.
Origin must be Signed and the sender should be the Admin of the asset class
.
class
: The class of the asset to be burned.instance
: The instance of the asset to be burned.check_owner
: IfSome
then the operation will fail withWrongOwner
unless the asset is owned by this value.
Emits Burned
with the actual amount burned.
Weight: O(1)
Modes: check_owner.is_some()
.
pub fn transfer(
origin: OriginFor<T>,
class: T::ClassId,
instance: T::InstanceId,
dest: <T::Lookup as StaticLookup>::Source
) -> DispatchResult
pub fn transfer(
origin: OriginFor<T>,
class: T::ClassId,
instance: T::InstanceId,
dest: <T::Lookup as StaticLookup>::Source
) -> DispatchResult
Move an asset from the sender account to another.
Origin must be Signed and the signing account must be either:
- the Admin of the asset
class
; - the Owner of the asset
instance
; - the approved delegate for the asset
instance
(in this case, the approval is reset).
Arguments:
class
: The class of the asset to be transferred.instance
: The instance of the asset to be transferred.dest
: The account to receive ownership of the asset.
Emits Transferred
.
Weight: O(1)
pub fn redeposit(
origin: OriginFor<T>,
class: T::ClassId,
instances: Vec<T::InstanceId>
) -> DispatchResult
pub fn redeposit(
origin: OriginFor<T>,
class: T::ClassId,
instances: Vec<T::InstanceId>
) -> DispatchResult
Reevaluate the deposits on some assets.
Origin must be Signed and the sender should be the Owner of the asset class
.
class
: The class of the asset to be frozen.instances
: The instances of the asset class whose deposits will be reevaluated.
NOTE: This exists as a best-effort function. Any asset instances which are unknown or in the case that the owner account does not have reservable funds to pay for a deposit increase are ignored. Generally the owner isn’t going to call this on instances whose existing deposit is less than the refreshed deposit as it would only cost them, so it’s of little consequence.
It will still return an error in the case that the class is unknown of the signer is not permitted to call it.
Weight: O(instances.len())
pub fn freeze(
origin: OriginFor<T>,
class: T::ClassId,
instance: T::InstanceId
) -> DispatchResult
pub fn freeze(
origin: OriginFor<T>,
class: T::ClassId,
instance: T::InstanceId
) -> DispatchResult
Disallow further unprivileged transfer of an asset instance.
Origin must be Signed and the sender should be the Freezer of the asset class
.
class
: The class of the asset to be frozen.instance
: The instance of the asset to be frozen.
Emits Frozen
.
Weight: O(1)
pub fn thaw(
origin: OriginFor<T>,
class: T::ClassId,
instance: T::InstanceId
) -> DispatchResult
pub fn thaw(
origin: OriginFor<T>,
class: T::ClassId,
instance: T::InstanceId
) -> DispatchResult
Re-allow unprivileged transfer of an asset instance.
Origin must be Signed and the sender should be the Freezer of the asset class
.
class
: The class of the asset to be thawed.instance
: The instance of the asset to be thawed.
Emits Thawed
.
Weight: O(1)
Disallow further unprivileged transfers for a whole asset class.
Origin must be Signed and the sender should be the Freezer of the asset class
.
class
: The asset class to be frozen.
Emits ClassFrozen
.
Weight: O(1)
Re-allow unprivileged transfers for a whole asset class.
Origin must be Signed and the sender should be the Admin of the asset class
.
class
: The class to be thawed.
Emits ClassThawed
.
Weight: O(1)
pub fn transfer_ownership(
origin: OriginFor<T>,
class: T::ClassId,
owner: <T::Lookup as StaticLookup>::Source
) -> DispatchResult
pub fn transfer_ownership(
origin: OriginFor<T>,
class: T::ClassId,
owner: <T::Lookup as StaticLookup>::Source
) -> DispatchResult
Change the Owner of an asset class.
Origin must be Signed and the sender should be the Owner of the asset class
.
class
: The asset class whose owner should be changed.owner
: The new Owner of this asset class.
Emits OwnerChanged
.
Weight: O(1)
pub fn set_team(
origin: OriginFor<T>,
class: T::ClassId,
issuer: <T::Lookup as StaticLookup>::Source,
admin: <T::Lookup as StaticLookup>::Source,
freezer: <T::Lookup as StaticLookup>::Source
) -> DispatchResult
pub fn set_team(
origin: OriginFor<T>,
class: T::ClassId,
issuer: <T::Lookup as StaticLookup>::Source,
admin: <T::Lookup as StaticLookup>::Source,
freezer: <T::Lookup as StaticLookup>::Source
) -> DispatchResult
Change the Issuer, Admin and Freezer of an asset class.
Origin must be Signed and the sender should be the Owner of the asset class
.
class
: The asset class whose team should be changed.issuer
: The new Issuer of this asset class.admin
: The new Admin of this asset class.freezer
: The new Freezer of this asset class.
Emits TeamChanged
.
Weight: O(1)
pub fn approve_transfer(
origin: OriginFor<T>,
class: T::ClassId,
instance: T::InstanceId,
delegate: <T::Lookup as StaticLookup>::Source
) -> DispatchResult
pub fn approve_transfer(
origin: OriginFor<T>,
class: T::ClassId,
instance: T::InstanceId,
delegate: <T::Lookup as StaticLookup>::Source
) -> DispatchResult
Approve an instance to be transferred by a delegated third-party account.
Origin must be Signed and must be the owner of the asset instance
.
class
: The class of the asset to be approved for delegated transfer.instance
: The instance of the asset to be approved for delegated transfer.delegate
: The account to delegate permission to transfer the asset.
Emits ApprovedTransfer
on success.
Weight: O(1)
pub fn cancel_approval(
origin: OriginFor<T>,
class: T::ClassId,
instance: T::InstanceId,
maybe_check_delegate: Option<<T::Lookup as StaticLookup>::Source>
) -> DispatchResult
pub fn cancel_approval(
origin: OriginFor<T>,
class: T::ClassId,
instance: T::InstanceId,
maybe_check_delegate: Option<<T::Lookup as StaticLookup>::Source>
) -> DispatchResult
Cancel the prior approval for the transfer of an asset by a delegate.
Origin must be either:
- the
Force
origin; Signed
with the signer being the Admin of the assetclass
;Signed
with the signer being the Owner of the assetinstance
;
Arguments:
class
: The class of the asset of whose approval will be cancelled.instance
: The instance of the asset of whose approval will be cancelled.maybe_check_delegate
: IfSome
will ensure that the given account is the one to which permission of transfer is delegated.
Emits ApprovalCancelled
on success.
Weight: O(1)
pub fn force_asset_status(
origin: OriginFor<T>,
class: T::ClassId,
owner: <T::Lookup as StaticLookup>::Source,
issuer: <T::Lookup as StaticLookup>::Source,
admin: <T::Lookup as StaticLookup>::Source,
freezer: <T::Lookup as StaticLookup>::Source,
free_holding: bool,
is_frozen: bool
) -> DispatchResult
pub fn force_asset_status(
origin: OriginFor<T>,
class: T::ClassId,
owner: <T::Lookup as StaticLookup>::Source,
issuer: <T::Lookup as StaticLookup>::Source,
admin: <T::Lookup as StaticLookup>::Source,
freezer: <T::Lookup as StaticLookup>::Source,
free_holding: bool,
is_frozen: bool
) -> DispatchResult
Alter the attributes of a given asset.
Origin must be ForceOrigin
.
class
: The identifier of the asset.owner
: The new Owner of this asset.issuer
: The new Issuer of this asset.admin
: The new Admin of this asset.freezer
: The new Freezer of this asset.free_holding
: Whether a deposit is taken for holding an instance of this asset class.is_frozen
: Whether this asset class is frozen except for permissioned/admin instructions.
Emits AssetStatusChanged
with the identity of the asset.
Weight: O(1)
pub fn set_attribute(
origin: OriginFor<T>,
class: T::ClassId,
maybe_instance: Option<T::InstanceId>,
key: BoundedVec<u8, T::KeyLimit>,
value: BoundedVec<u8, T::ValueLimit>
) -> DispatchResult
pub fn set_attribute(
origin: OriginFor<T>,
class: T::ClassId,
maybe_instance: Option<T::InstanceId>,
key: BoundedVec<u8, T::KeyLimit>,
value: BoundedVec<u8, T::ValueLimit>
) -> DispatchResult
Set an attribute for an asset class or instance.
Origin must be either ForceOrigin
or Signed and the sender should be the Owner of the
asset class
.
If the origin is Signed, then funds of signer are reserved according to the formula:
MetadataDepositBase + DepositPerByte * (key.len + value.len)
taking into
account any already reserved funds.
class
: The identifier of the asset class whose instance’s metadata to set.maybe_instance
: The identifier of the asset instance whose metadata to set.key
: The key of the attribute.value
: The value to which to set the attribute.
Emits AttributeSet
.
Weight: O(1)
pub fn clear_attribute(
origin: OriginFor<T>,
class: T::ClassId,
maybe_instance: Option<T::InstanceId>,
key: BoundedVec<u8, T::KeyLimit>
) -> DispatchResult
pub fn clear_attribute(
origin: OriginFor<T>,
class: T::ClassId,
maybe_instance: Option<T::InstanceId>,
key: BoundedVec<u8, T::KeyLimit>
) -> DispatchResult
Set an attribute for an asset class or instance.
Origin must be either ForceOrigin
or Signed and the sender should be the Owner of the
asset class
.
If the origin is Signed, then funds of signer are reserved according to the formula:
MetadataDepositBase + DepositPerByte * (key.len + value.len)
taking into
account any already reserved funds.
class
: The identifier of the asset class whose instance’s metadata to set.instance
: The identifier of the asset instance whose metadata to set.key
: The key of the attribute.value
: The value to which to set the attribute.
Emits AttributeSet
.
Weight: O(1)
pub fn set_metadata(
origin: OriginFor<T>,
class: T::ClassId,
instance: T::InstanceId,
data: BoundedVec<u8, T::StringLimit>,
is_frozen: bool
) -> DispatchResult
pub fn set_metadata(
origin: OriginFor<T>,
class: T::ClassId,
instance: T::InstanceId,
data: BoundedVec<u8, T::StringLimit>,
is_frozen: bool
) -> DispatchResult
Set the metadata for an asset instance.
Origin must be either ForceOrigin
or Signed and the sender should be the Owner of the
asset class
.
If the origin is Signed, then funds of signer are reserved according to the formula:
MetadataDepositBase + DepositPerByte * data.len
taking into
account any already reserved funds.
class
: The identifier of the asset class whose instance’s metadata to set.instance
: The identifier of the asset instance whose metadata to set.data
: The general information of this asset. Limited in length byStringLimit
.is_frozen
: Whether the metadata should be frozen against further changes.
Emits MetadataSet
.
Weight: O(1)
pub fn clear_metadata(
origin: OriginFor<T>,
class: T::ClassId,
instance: T::InstanceId
) -> DispatchResult
pub fn clear_metadata(
origin: OriginFor<T>,
class: T::ClassId,
instance: T::InstanceId
) -> DispatchResult
Clear the metadata for an asset instance.
Origin must be either ForceOrigin
or Signed and the sender should be the Owner of the
asset instance
.
Any deposit is freed for the asset class owner.
class
: The identifier of the asset class whose instance’s metadata to clear.instance
: The identifier of the asset instance whose metadata to clear.
Emits MetadataCleared
.
Weight: O(1)
pub fn set_class_metadata(
origin: OriginFor<T>,
class: T::ClassId,
data: BoundedVec<u8, T::StringLimit>,
is_frozen: bool
) -> DispatchResult
pub fn set_class_metadata(
origin: OriginFor<T>,
class: T::ClassId,
data: BoundedVec<u8, T::StringLimit>,
is_frozen: bool
) -> DispatchResult
Set the metadata for an asset class.
Origin must be either ForceOrigin
or Signed
and the sender should be the Owner of
the asset class
.
If the origin is Signed
, then funds of signer are reserved according to the formula:
MetadataDepositBase + DepositPerByte * data.len
taking into
account any already reserved funds.
class
: The identifier of the asset whose metadata to update.data
: The general information of this asset. Limited in length byStringLimit
.is_frozen
: Whether the metadata should be frozen against further changes.
Emits ClassMetadataSet
.
Weight: O(1)
Clear the metadata for an asset class.
Origin must be either ForceOrigin
or Signed
and the sender should be the Owner of
the asset class
.
Any deposit is freed for the asset class owner.
class
: The identifier of the asset class whose metadata to clear.
Emits ClassMetadataCleared
.
Weight: O(1)
Trait Implementations
impl<T: Config<I>, I: 'static> Benchmarking<BenchmarkResults> for Pallet<T, I> where
T: Config,
impl<T: Config<I>, I: 'static> Benchmarking<BenchmarkResults> for Pallet<T, I> where
T: Config,
Get the benchmarks available for this pallet. Generally there is one benchmark per extrinsic, so these are sometimes just called “extrinsics”. Read more
fn run_benchmark(
extrinsic: &[u8],
c: &[(BenchmarkParameter, u32)],
whitelist: &[TrackedStorageKey],
verify: bool,
internal_repeats: u32
) -> Result<Vec<BenchmarkResults>, &'static str>
fn run_benchmark(
extrinsic: &[u8],
c: &[(BenchmarkParameter, u32)],
whitelist: &[TrackedStorageKey],
verify: bool,
internal_repeats: u32
) -> Result<Vec<BenchmarkResults>, &'static str>
Run the benchmarks for this pallet.
fn create_class(
class: &Self::ClassId,
who: &T::AccountId,
admin: &T::AccountId
) -> DispatchResult
fn create_class(
class: &Self::ClassId,
who: &T::AccountId,
admin: &T::AccountId
) -> DispatchResult
Create a class
of nonfungible assets to be owned by who
and managed by admin
.
Returns the current storage version as supported by the pallet.
Returns the on-chain storage version of the pallet as stored in the storage.
The block is being finalized. Implement to have something happen.
This will be run when the block is being finalized (before 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. Read more
The block is being initialized. Implement to have something happen. Read more
Perform a module upgrade. Read more
Execute some pre-checks prior to a runtime upgrade. Read more
Execute some post-checks after a runtime upgrade. Read more
Implementing this function on a module allows you to perform long-running tasks that make (by default) validators generate transactions that feed results of those long-running computations back on chain. Read more
Run integrity test. Read more
Returns the attribute value of instance
of class
corresponding to key
.
When key
is empty, we return the instance metadata value.
By default this is None
; no attributes are defined.
Returns the attribute value of instance
of class
corresponding to key
.
When key
is empty, we return the instance metadata value.
By default this is None
; no attributes are defined.
Returns true
if the asset instance
of class
may be transferred.
Default implementation is that all assets are transferable.
type InstanceId = T::InstanceId
type InstanceId = T::InstanceId
Type for identifying an asset instance.
Type for identifying an asset class (an identifier for an independent collection of asset instances). Read more
fn owner(
class: &Self::ClassId,
instance: &Self::InstanceId
) -> Option<<T as SystemConfig>::AccountId>
fn owner(
class: &Self::ClassId,
instance: &Self::InstanceId
) -> Option<<T as SystemConfig>::AccountId>
Returns the owner of asset instance
of class
, or None
if the asset doesn’t exist (or
somehow has no owner). Read more
Returns the owner of the asset class
, if there is one. For many NFTs this may not make
any sense, so users of this API should not be surprised to find an asset class results in
None
here. Read more
fn typed_attribute<K, V>(
class: &Self::ClassId,
instance: &Self::InstanceId,
key: &K
) -> Option<V> where
K: Encode,
V: Decode,
fn typed_attribute<K, V>(
class: &Self::ClassId,
instance: &Self::InstanceId,
key: &K
) -> Option<V> where
K: Encode,
V: Decode,
Returns the strongly-typed attribute value of instance
of class
corresponding to key
. Read more
Returns an iterator of the asset classes in existence.
NOTE: iterating this list invokes a storage read per item.
Returns an iterator of the instances of an asset class
in existence.
NOTE: iterating this list invokes a storage read per item.
Returns an iterator of the asset instances of all classes owned by who
.
NOTE: iterating this list invokes a storage read per item.
fn owned_in_class(
class: &Self::ClassId,
who: &T::AccountId
) -> Box<dyn Iterator<Item = Self::InstanceId>>
fn owned_in_class(
class: &Self::ClassId,
who: &T::AccountId
) -> Box<dyn Iterator<Item = Self::InstanceId>>
Returns an iterator of the asset instances of class
owned by who
.
NOTE: iterating this list invokes a storage read per item.
Run integrity test. Read more
fn mint_into(
class: &Self::ClassId,
instance: &Self::InstanceId,
who: &T::AccountId
) -> DispatchResult
fn mint_into(
class: &Self::ClassId,
instance: &Self::InstanceId,
who: &T::AccountId
) -> DispatchResult
Mint some asset instance
of class
to be owned by who
. Read more
Burn some asset instance
of class
. Read more
fn set_attribute(
_class: &Self::ClassId,
_instance: &Self::InstanceId,
_key: &[u8],
_value: &[u8]
) -> Result<(), DispatchError>
fn set_attribute(
_class: &Self::ClassId,
_instance: &Self::InstanceId,
_key: &[u8],
_value: &[u8]
) -> Result<(), DispatchError>
Set attribute value
of asset instance
of class
’s key
. Read more
fn set_typed_attribute<K, V>(
class: &Self::ClassId,
instance: &Self::InstanceId,
key: &K,
value: &V
) -> Result<(), DispatchError> where
K: Encode,
V: Encode,
fn set_typed_attribute<K, V>(
class: &Self::ClassId,
instance: &Self::InstanceId,
key: &K,
value: &V
) -> Result<(), DispatchError> where
K: Encode,
V: Encode,
Attempt to set the strongly-typed attribute value
of instance
of class
’s key
. Read more
Set attribute value
of asset class
’s key
. Read more
fn set_typed_class_attribute<K, V>(
class: &Self::ClassId,
key: &K,
value: &V
) -> Result<(), DispatchError> where
K: Encode,
V: Encode,
fn set_typed_class_attribute<K, V>(
class: &Self::ClassId,
key: &K,
value: &V
) -> Result<(), DispatchError> where
K: Encode,
V: Encode,
Attempt to set the strongly-typed attribute value
of class
’s key
. Read more
This function is being called after every block import (when fully synced). Read more
The block is being finalized. Implement to have something happen. Read more
Something that should happen at genesis.
The block is being finalized.
Implement to have something happen in case there is leftover weight.
Check the passed remaining_weight
to make sure it is high enough to allow for
your pallet’s extra computation. Read more
The block is being initialized. Implement to have something happen. Read more
fn transfer(
class: &Self::ClassId,
instance: &Self::InstanceId,
destination: &T::AccountId
) -> DispatchResult
fn transfer(
class: &Self::ClassId,
instance: &Self::InstanceId,
destination: &T::AccountId
) -> DispatchResult
Transfer asset instance
of class
into destination
account.
Auto Trait Implementations
impl<T, I> RefUnwindSafe for Pallet<T, I> where
I: RefUnwindSafe,
T: RefUnwindSafe,
impl<T, I> UnwindSafe for Pallet<T, I> where
I: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more
impl<T> Downcast for T where
T: Any,
impl<T> Downcast for T where
T: Any,
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
pub fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
pub fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
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
pub fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
pub fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
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
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
Generate a storage key unique to this runtime upgrade. Read more
Get temporary storage data written by Self::set_temp_storage
. Read more
Write some temporary data to a specific storage that can be read (potentially in
post-upgrade hook) via Self::get_temp_storage
. Read more
impl<T> PalletVersionToStorageVersionHelper for T where
T: GetStorageVersion + PalletInfoAccess,
impl<T> PalletVersionToStorageVersionHelper for T where
T: GetStorageVersion + PalletInfoAccess,
type Output = T
type Output = T
Should always be Self
The inverse inclusion map: attempts to construct self
from the equivalent element of its
superset. Read more
pub fn is_in_subset(&self) -> bool
pub fn is_in_subset(&self) -> bool
Checks if self
is actually part of its subset T
(and can be converted to it).
pub fn to_subset_unchecked(&self) -> SS
pub fn to_subset_unchecked(&self) -> SS
Use with care! Same as self.to_subset
but without any property checks. Always succeeds.
pub fn from_subset(element: &SS) -> SP
pub fn from_subset(element: &SS) -> SP
The inclusion map: converts self
to the equivalent element of its superset.
The counterpart to unchecked_from
.
Consume self to return an equivalent value of T
.
pub fn vzip(self) -> V
impl<T> MaybeDebug for T where
T: Debug,
impl<T> MaybeDebug for T where
T: Debug,