pub struct ManifestBuilder<M = TransactionManifestV1>where
M: BuildableManifest,{ /* private fields */ }Expand description
A manifest builder for use in tests.
Note - if you break invariants of the manifest builder (e.g. resolve a bucket before it’s been created, or pass an invalid parameter), this builder will panic. As such, it’s only designed for use in test code, or where the inputs are trusted.
Simple use case:
let manifest = ManifestBuilder::new()
.lock_fee_from_faucet()
.withdraw_from_account(from_account_address, XRD, dec!(1))
.take_from_worktop(XRD, dec!(1), "xrd")
.try_deposit_or_abort(to_account_address, None, "xrd")
.build();Intermediate use case, where we need to pass a bucket into a component:
let manifest = ManifestBuilder::new()
.lock_fee_from_faucet()
.withdraw_from_account(from_account_address, XRD, dec!(1))
.take_from_worktop(XRD, dec!(1), "xrd")
.call_function_with_name_lookup(
package_address,
"SomeBlueprint",
"some_function",
|lookup| (
lookup.bucket("xrd"),
),
)
.build();Advanced use case, where we need to generate a collision-free bucket name:
let mut builder = ManifestBuilder::new()
.lock_fee_from_faucet()
.get_free_xrd_from_faucet();
for _ in 0..32 {
// The generate_bucket_name method generates a new bucket name starting with
// "transfer" that doesn't collide with any previously used bucket names
let bucket_name = builder.generate_bucket_name("transfer");
builder = builder
.take_from_worktop(XRD, "0.001", &bucket_name)
.try_deposit_or_abort(to_account_address, None, bucket_name);
}
let manifest = builder.build();Implementations§
Source§impl ManifestBuilder
impl ManifestBuilder
Sourcepub fn new() -> ManifestBuilder
pub fn new() -> ManifestBuilder
To create a Manifest Builder of a specific version, you may
wish to use a specific new method such as new_v1(), new_v2()
or new_system_v1().
For backwards compatibility, we had to keep
ManifestBuilder::new() creating a [ManifestV1Builder].
Sourcepub fn new_v1() -> ManifestBuilder
pub fn new_v1() -> ManifestBuilder
This exists so that you can call ManifestBuilder::new_v1().
It is equivalent to:
ManifestBuilder::<TransactionManifestV1>::new_typed()TransactionManifestV1Builder::new_typed()
Source§impl ManifestBuilder<TransactionManifestV2>
impl ManifestBuilder<TransactionManifestV2>
Sourcepub fn new_v2() -> ManifestBuilder<TransactionManifestV2>
pub fn new_v2() -> ManifestBuilder<TransactionManifestV2>
This exists so that you can call ManifestBuilder::new_v2().
It is equivalent to:
ManifestBuilder::<TransactionManifestV2>::new_typed()ManifestV2Builder::new_typed()
For backwards compatibility, we had to keep
ManifestBuilder::new() creating a [ManifestV1Builder].
Source§impl ManifestBuilder<SubintentManifestV2>
impl ManifestBuilder<SubintentManifestV2>
Sourcepub fn new_subintent_v2() -> ManifestBuilder<SubintentManifestV2>
pub fn new_subintent_v2() -> ManifestBuilder<SubintentManifestV2>
This exists so that you can call ManifestBuilder::new_subintent_v2().
It is equivalent to:
ManifestBuilder::<SubintentManifestV2>::new_typed()SubintentManifestV2Builder::new_typed()
For backwards compatibility, we had to keep
ManifestBuilder::new() creating a [ManifestV1Builder].
Source§impl ManifestBuilder<SystemTransactionManifestV1>
impl ManifestBuilder<SystemTransactionManifestV1>
Sourcepub fn new_system_v1() -> ManifestBuilder<SystemTransactionManifestV1>
pub fn new_system_v1() -> ManifestBuilder<SystemTransactionManifestV1>
This exists so that you can call ManifestBuilder::new_system_v1().
It is equivalent to:
ManifestBuilder::<SystemTransactionManifestV1>::new_typed()SystemV1ManifestBuilder::new_typed()
pub fn use_preallocated_address( &mut self, fixed_address: impl Into<GlobalAddress>, package_address: impl Into<PackageAddress>, blueprint_name: impl Into<String>, ) -> ManifestAddressReservation
Source§impl<M> ManifestBuilder<M>
impl<M> ManifestBuilder<M>
pub fn preallocate_address( self, reservation: impl NewManifestAddressReservation, fixed_address: impl Into<GlobalAddress>, package_address: impl Into<PackageAddress>, blueprint_name: impl Into<String>, ) -> ManifestBuilder<M>
pub fn preallocate_address_internal( &mut self, reservation: impl NewManifestAddressReservation, fixed_address: impl Into<GlobalAddress>, package_address: impl Into<PackageAddress>, blueprint_name: impl Into<String>, )
Source§impl<M> ManifestBuilder<M>where
M: BuildableManifest,
impl<M> ManifestBuilder<M>where
M: BuildableManifest,
pub fn new_typed() -> ManifestBuilder<M>
pub fn name_lookup(&self) -> ManifestNameLookup
pub fn then( self, next: impl FnOnce(ManifestBuilder<M>) -> ManifestBuilder<M>, ) -> ManifestBuilder<M>
pub fn with_name_lookup( self, next: impl FnOnce(ManifestBuilder<M>, ManifestNameLookup) -> ManifestBuilder<M>, ) -> ManifestBuilder<M>
pub fn with_bucket( self, bucket: impl LabelledResolve<ManifestBucket>, next: impl FnOnce(ManifestBuilder<M>, ManifestBucket) -> ManifestBuilder<M>, ) -> ManifestBuilder<M>
pub fn bucket(&self, name: impl AsRef<str>) -> ManifestBucket
pub fn proof(&self, name: impl AsRef<str>) -> ManifestProof
pub fn named_address(&self, name: impl AsRef<str>) -> ManifestNamedAddress
pub fn address(&self, name: impl AsRef<str>) -> ManifestAddress
pub fn address_reservation( &self, name: impl AsRef<str>, ) -> ManifestAddressReservation
Sourcepub fn generate_bucket_name(&self, prefix: impl Into<String>) -> String
pub fn generate_bucket_name(&self, prefix: impl Into<String>) -> String
Generates an unused bucket name with the given prefix. This should be used when you are programmatically generating buckets, and need to generate bucket names which do not clash.
Sourcepub fn generate_proof_name(&self, prefix: impl Into<String>) -> String
pub fn generate_proof_name(&self, prefix: impl Into<String>) -> String
Generates an unused proof name with the given prefix. This should be used when you are programmatically generating proofs, and need to generate names which do not clash.
Sourcepub fn generate_address_reservation_name(
&self,
prefix: impl Into<String>,
) -> String
pub fn generate_address_reservation_name( &self, prefix: impl Into<String>, ) -> String
Generates an unused address reservation name with the given prefix. This should be used when you are programmatically generating address reservations, and need to generate names which do not clash.
Sourcepub fn generate_address_name(&self, prefix: impl Into<String>) -> String
pub fn generate_address_name(&self, prefix: impl Into<String>) -> String
Generates an unused address name with the given prefix. This should be used when you are programmatically generating named addresses, and need to generate names which do not clash.
pub fn object_names(&self) -> KnownManifestObjectNames
Sourcepub fn add_blob(&mut self, blob_content: Vec<u8>) -> ManifestBlobRef
pub fn add_blob(&mut self, blob_content: Vec<u8>) -> ManifestBlobRef
Example usage:
let manifest = ManifestBuilder::new()
.withdraw_from_account(from_account_address, XRD, dec!(1))
// ...
.then(|mut builder| {
let code_blob_ref = builder.add_blob(vec![]);
builder
.call_function(
package_address,
"my_blueprint",
"func_name",
manifest_args!(code_blob_ref),
)
})
.build();Sourcepub fn add_instruction_advanced(
self,
instruction: impl Into<<M as TypedReadableManifest>::Instruction>,
) -> (ManifestBuilder<M>, NewSymbols)
pub fn add_instruction_advanced( self, instruction: impl Into<<M as TypedReadableManifest>::Instruction>, ) -> (ManifestBuilder<M>, NewSymbols)
Only for use in advanced use cases. Returns all the created symbols as part of the instruction.
Sourcepub fn build(self) -> M
pub fn build(self) -> M
Validates the built manifest with the tightest rules, and returns the manifest.
If you don’t wish to validate the manifest, use build_no_validate instead.
Sourcepub fn build_no_validate(self) -> M
pub fn build_no_validate(self) -> M
Returns the built transaction manifest, without further validation.
If you also wish to validate the manifest, use build instead.
Source§impl<M> ManifestBuilder<M>
impl<M> ManifestBuilder<M>
Sourcepub fn take_all_from_worktop(
self,
resource_address: impl ResolvableStaticManifestResourceAddress,
new_bucket: impl NewManifestBucket,
) -> ManifestBuilder<M>
pub fn take_all_from_worktop( self, resource_address: impl ResolvableStaticManifestResourceAddress, new_bucket: impl NewManifestBucket, ) -> ManifestBuilder<M>
Takes resource from worktop.
Sourcepub fn take_from_worktop(
self,
resource_address: impl ResolvableStaticManifestResourceAddress,
amount: impl Resolve<Decimal>,
new_bucket: impl NewManifestBucket,
) -> ManifestBuilder<M>
pub fn take_from_worktop( self, resource_address: impl ResolvableStaticManifestResourceAddress, amount: impl Resolve<Decimal>, new_bucket: impl NewManifestBucket, ) -> ManifestBuilder<M>
Takes resource from worktop, by amount.
Sourcepub fn take_non_fungibles_from_worktop(
self,
resource_address: impl ResolvableStaticManifestResourceAddress,
ids: impl IntoIterator<Item = NonFungibleLocalId>,
new_bucket: impl NewManifestBucket,
) -> ManifestBuilder<M>
pub fn take_non_fungibles_from_worktop( self, resource_address: impl ResolvableStaticManifestResourceAddress, ids: impl IntoIterator<Item = NonFungibleLocalId>, new_bucket: impl NewManifestBucket, ) -> ManifestBuilder<M>
Takes resource from worktop, by non-fungible ids.
Sourcepub fn return_to_worktop(
self,
bucket: impl ConsumedManifestBucket,
) -> ManifestBuilder<M>
pub fn return_to_worktop( self, bucket: impl ConsumedManifestBucket, ) -> ManifestBuilder<M>
Adds a bucket of resource to worktop.
Sourcepub fn assert_worktop_contains(
self,
resource_address: impl ResolvableStaticManifestResourceAddress,
amount: impl Resolve<Decimal>,
) -> ManifestBuilder<M>
pub fn assert_worktop_contains( self, resource_address: impl ResolvableStaticManifestResourceAddress, amount: impl Resolve<Decimal>, ) -> ManifestBuilder<M>
Asserts that worktop contains resource.
Sourcepub fn assert_worktop_contains_any(
self,
resource_address: impl ResolvableStaticManifestResourceAddress,
) -> ManifestBuilder<M>
pub fn assert_worktop_contains_any( self, resource_address: impl ResolvableStaticManifestResourceAddress, ) -> ManifestBuilder<M>
Asserts that worktop contains resource.
Sourcepub fn assert_worktop_contains_non_fungibles(
self,
resource_address: impl ResolvableStaticManifestResourceAddress,
ids: impl IntoIterator<Item = NonFungibleLocalId>,
) -> ManifestBuilder<M>
pub fn assert_worktop_contains_non_fungibles( self, resource_address: impl ResolvableStaticManifestResourceAddress, ids: impl IntoIterator<Item = NonFungibleLocalId>, ) -> ManifestBuilder<M>
Asserts that worktop contains resource.
Sourcepub fn pop_from_auth_zone(
self,
new_proof: impl NewManifestProof,
) -> ManifestBuilder<M>
pub fn pop_from_auth_zone( self, new_proof: impl NewManifestProof, ) -> ManifestBuilder<M>
Pops the most recent proof from auth zone.
Sourcepub fn push_to_auth_zone(
self,
proof: impl ConsumedManifestProof,
) -> ManifestBuilder<M>
pub fn push_to_auth_zone( self, proof: impl ConsumedManifestProof, ) -> ManifestBuilder<M>
Pushes a proof onto the auth zone
Sourcepub fn create_proof_from_auth_zone_of_amount(
self,
resource_address: impl ResolvableStaticManifestResourceAddress,
amount: impl Resolve<Decimal>,
new_proof: impl NewManifestProof,
) -> ManifestBuilder<M>
pub fn create_proof_from_auth_zone_of_amount( self, resource_address: impl ResolvableStaticManifestResourceAddress, amount: impl Resolve<Decimal>, new_proof: impl NewManifestProof, ) -> ManifestBuilder<M>
Creates proof from the auth zone by amount.
Sourcepub fn create_proof_from_auth_zone_of_non_fungibles(
self,
resource_address: impl ResolvableStaticManifestResourceAddress,
ids: impl IntoIterator<Item = NonFungibleLocalId>,
new_proof: impl NewManifestProof,
) -> ManifestBuilder<M>
pub fn create_proof_from_auth_zone_of_non_fungibles( self, resource_address: impl ResolvableStaticManifestResourceAddress, ids: impl IntoIterator<Item = NonFungibleLocalId>, new_proof: impl NewManifestProof, ) -> ManifestBuilder<M>
Creates proof from the auth zone by non-fungible ids.
Sourcepub fn create_proof_from_auth_zone_of_all(
self,
resource_address: impl ResolvableStaticManifestResourceAddress,
new_proof: impl NewManifestProof,
) -> ManifestBuilder<M>
pub fn create_proof_from_auth_zone_of_all( self, resource_address: impl ResolvableStaticManifestResourceAddress, new_proof: impl NewManifestProof, ) -> ManifestBuilder<M>
Creates proof from the auth zone
Sourcepub fn create_proof_from_bucket_of_amount(
self,
bucket: impl ReferencedManifestBucket,
amount: impl Resolve<Decimal>,
new_proof: impl NewManifestProof,
) -> ManifestBuilder<M>
pub fn create_proof_from_bucket_of_amount( self, bucket: impl ReferencedManifestBucket, amount: impl Resolve<Decimal>, new_proof: impl NewManifestProof, ) -> ManifestBuilder<M>
Creates proof from a bucket. The bucket is not consumed by this process.
Sourcepub fn create_proof_from_bucket_of_non_fungibles(
self,
bucket: impl ReferencedManifestBucket,
ids: impl IntoIterator<Item = NonFungibleLocalId>,
new_proof: impl NewManifestProof,
) -> ManifestBuilder<M>
pub fn create_proof_from_bucket_of_non_fungibles( self, bucket: impl ReferencedManifestBucket, ids: impl IntoIterator<Item = NonFungibleLocalId>, new_proof: impl NewManifestProof, ) -> ManifestBuilder<M>
Creates proof from a bucket. The bucket is not consumed by this process.
Sourcepub fn create_proof_from_bucket_of_all(
self,
bucket: impl ReferencedManifestBucket,
new_proof: impl NewManifestProof,
) -> ManifestBuilder<M>
pub fn create_proof_from_bucket_of_all( self, bucket: impl ReferencedManifestBucket, new_proof: impl NewManifestProof, ) -> ManifestBuilder<M>
Creates proof from a bucket. The bucket is not consumed by this process.
Sourcepub fn clone_proof(
self,
proof: impl ReferencedManifestProof,
new_proof: impl NewManifestProof,
) -> ManifestBuilder<M>
pub fn clone_proof( self, proof: impl ReferencedManifestProof, new_proof: impl NewManifestProof, ) -> ManifestBuilder<M>
Clones a proof.
pub fn allocate_global_address( self, package_address: impl ResolvableStaticManifestPackageAddress, blueprint_name: impl Into<String>, new_address_reservation: impl NewManifestAddressReservation, new_address_name: impl NewNamedManifestAddress, ) -> ManifestBuilder<M>
Sourcepub fn drop_proof(self, proof: impl ConsumedManifestProof) -> ManifestBuilder<M>
pub fn drop_proof(self, proof: impl ConsumedManifestProof) -> ManifestBuilder<M>
Drops a proof.
Sourcepub fn drop_all_proofs(self) -> ManifestBuilder<M>
pub fn drop_all_proofs(self) -> ManifestBuilder<M>
Drops all proofs.
Sourcepub fn drop_named_proofs(self) -> ManifestBuilder<M>
pub fn drop_named_proofs(self) -> ManifestBuilder<M>
Drops named proofs.
Sourcepub fn drop_auth_zone_signature_proofs(self) -> ManifestBuilder<M>
pub fn drop_auth_zone_signature_proofs(self) -> ManifestBuilder<M>
Drops auth zone signature proofs.
Sourcepub fn drop_auth_zone_regular_proofs(self) -> ManifestBuilder<M>
pub fn drop_auth_zone_regular_proofs(self) -> ManifestBuilder<M>
Drops auth zone regular proofs.
Sourcepub fn drop_auth_zone_proofs(self) -> ManifestBuilder<M>
pub fn drop_auth_zone_proofs(self) -> ManifestBuilder<M>
Drop auth zone proofs.
Sourcepub fn create_fungible_resource(
self,
owner_role: OwnerRole,
track_total_supply: bool,
divisibility: u8,
resource_roles: FungibleResourceRoles,
metadata: ModuleConfig<KeyValueStoreInit<String, GenericMetadataValue<UncheckedUrl, UncheckedOrigin>>>,
initial_supply: Option<Decimal>,
) -> ManifestBuilder<M>
pub fn create_fungible_resource( self, owner_role: OwnerRole, track_total_supply: bool, divisibility: u8, resource_roles: FungibleResourceRoles, metadata: ModuleConfig<KeyValueStoreInit<String, GenericMetadataValue<UncheckedUrl, UncheckedOrigin>>>, initial_supply: Option<Decimal>, ) -> ManifestBuilder<M>
Creates a fungible resource
Sourcepub fn create_non_fungible_resource<T, V>(
self,
owner_role: OwnerRole,
id_type: NonFungibleIdType,
track_total_supply: bool,
resource_roles: NonFungibleResourceRoles,
metadata: ModuleConfig<KeyValueStoreInit<String, GenericMetadataValue<UncheckedUrl, UncheckedOrigin>>>,
initial_supply: Option<T>,
) -> ManifestBuilder<M>
pub fn create_non_fungible_resource<T, V>( self, owner_role: OwnerRole, id_type: NonFungibleIdType, track_total_supply: bool, resource_roles: NonFungibleResourceRoles, metadata: ModuleConfig<KeyValueStoreInit<String, GenericMetadataValue<UncheckedUrl, UncheckedOrigin>>>, initial_supply: Option<T>, ) -> ManifestBuilder<M>
Creates a new non-fungible resource
pub fn create_ruid_non_fungible_resource<T, V>( self, owner_role: OwnerRole, track_total_supply: bool, metadata: ModuleConfig<KeyValueStoreInit<String, GenericMetadataValue<UncheckedUrl, UncheckedOrigin>>>, resource_roles: NonFungibleResourceRoles, initial_supply: Option<T>, ) -> ManifestBuilder<M>
pub fn update_non_fungible_data( self, resource_address: impl ReferencedManifestResourceAddress, id: NonFungibleLocalId, field_name: impl Into<String>, data: impl ManifestEncode, ) -> ManifestBuilder<M>
pub fn create_identity_advanced( self, owner_role: OwnerRole, ) -> ManifestBuilder<M>
pub fn create_identity(self) -> ManifestBuilder<M>
pub fn create_validator( self, key: Secp256k1PublicKey, fee_factor: impl Resolve<Decimal>, xrd_payment: impl ConsumedManifestBucket, ) -> ManifestBuilder<M>
pub fn register_validator( self, validator_address: impl ReferencedManifestComponentAddress, ) -> ManifestBuilder<M>
pub fn unregister_validator( self, validator_address: impl ReferencedManifestComponentAddress, ) -> ManifestBuilder<M>
pub fn signal_protocol_update_readiness( self, validator_address: impl ReferencedManifestComponentAddress, protocol_version_name: &str, ) -> ManifestBuilder<M>
pub fn stake_validator_as_owner( self, validator_address: impl ReferencedManifestComponentAddress, bucket: impl ConsumedManifestBucket, ) -> ManifestBuilder<M>
pub fn stake_validator( self, validator_address: impl ReferencedManifestComponentAddress, bucket: impl ConsumedManifestBucket, ) -> ManifestBuilder<M>
pub fn unstake_validator( self, validator_address: impl ReferencedManifestComponentAddress, bucket: impl ConsumedManifestBucket, ) -> ManifestBuilder<M>
pub fn claim_xrd( self, validator_address: impl ReferencedManifestComponentAddress, bucket: impl ConsumedManifestBucket, ) -> ManifestBuilder<M>
Sourcepub fn call_function(
self,
package_address: impl ReferencedManifestPackageAddress,
blueprint_name: impl Into<String>,
function_name: impl Into<String>,
arguments: impl ResolvableArguments,
) -> ManifestBuilder<M>
pub fn call_function( self, package_address: impl ReferencedManifestPackageAddress, blueprint_name: impl Into<String>, function_name: impl Into<String>, arguments: impl ResolvableArguments, ) -> ManifestBuilder<M>
Calls a scrypto function where the arguments should be one of:
- A tuple, such as
(),(x,)or(x, y, z)- IMPORTANT: If calling with a single argument, you must include a trailing comma in the tuple declaration. This ensures that the rust compiler knows it’s a singleton tuple, rather than just some brackets around the inner value.
- A struct which implements
ManifestEncoderepresenting the arguments manifest_args!(x, y, z)
NOTE: If you need access to named buckets/proofs etc, use then or call_function_with_name_lookup
instead.
Sourcepub fn call_function_raw(
self,
package_address: impl ReferencedManifestPackageAddress,
blueprint_name: impl Into<String>,
function_name: impl Into<String>,
arguments: Value<ManifestCustomValueKind, ManifestCustomValue>,
) -> ManifestBuilder<M>
pub fn call_function_raw( self, package_address: impl ReferencedManifestPackageAddress, blueprint_name: impl Into<String>, function_name: impl Into<String>, arguments: Value<ManifestCustomValueKind, ManifestCustomValue>, ) -> ManifestBuilder<M>
Calls a scrypto function where the arguments are a raw ManifestValue. The caller is required to ensure the ManifestValue is a Tuple.
You should prefer call_function or call_function_with_name_lookup instead.
Sourcepub fn call_function_with_name_lookup<T>(
self,
package_address: impl ReferencedManifestPackageAddress,
blueprint_name: impl Into<String>,
function_name: impl Into<String>,
arguments_creator: impl FnOnce(&ManifestNameLookup) -> T,
) -> ManifestBuilder<M>where
T: ResolvableArguments,
pub fn call_function_with_name_lookup<T>(
self,
package_address: impl ReferencedManifestPackageAddress,
blueprint_name: impl Into<String>,
function_name: impl Into<String>,
arguments_creator: impl FnOnce(&ManifestNameLookup) -> T,
) -> ManifestBuilder<M>where
T: ResolvableArguments,
Calls a scrypto function where the arguments will be created using the given
callback, which takes a lookup (allowing for resolving named buckets, proofs, etc)
and returns resolvable arguments.
You may prefer using then instead.
The resolvable arguments should be one of:
- A tuple, such as
(),(x,)or(x, y, z)- IMPORTANT: If calling with a single argument, you must include a trailing comma in the tuple declaration. This ensures that the rust compiler knows it’s a singleton tuple, rather than just some brackets around the inner value.
- A struct which implements
ManifestEncoderepresenting the arguments manifest_args!(x, y, z)
Example:
let manifest = ManifestBuilder::new()
.lock_fee_from_faucet()
.withdraw_from_account(from_account_address, XRD, dec!(1))
.take_from_worktop(XRD, dec!(1), "xrd_bucket")
.call_function_with_name_lookup(
package_address,
"SomeBlueprint",
"some_function",
|lookup| (
"argument1",
lookup.bucket("xrd_bucket"),
dec!("1.3")
),
)
.build();
// Alternative using `then`
let manifest2 = ManifestBuilder::new()
.lock_fee_from_faucet()
.withdraw_from_account(from_account_address, XRD, dec!(1))
.take_from_worktop(XRD, dec!(1), "xrd_bucket")
.then(|builder| {
let lookup = builder.name_lookup();
builder.call_function(
package_address,
"SomeBlueprint",
"some_function",
("argument1", lookup.bucket("xrd_bucket"), dec!("1.3")),
)
})
.build();Sourcepub fn call_method(
self,
address: impl ReferencedManifestGlobalAddress,
method_name: impl Into<String>,
arguments: impl ResolvableArguments,
) -> ManifestBuilder<M>
pub fn call_method( self, address: impl ReferencedManifestGlobalAddress, method_name: impl Into<String>, arguments: impl ResolvableArguments, ) -> ManifestBuilder<M>
Calls a scrypto method where the arguments should be one of:
- A tuple, such as
(),(x,)or(x, y, z)- IMPORTANT: If calling with a single argument, you must include a trailing comma in the tuple declaration. This ensures that the rust compiler knows it’s a singleton tuple, rather than just some brackets around the inner value.
- A struct which implements
ManifestEncoderepresenting the arguments manifest_args!(x, y, z)
NOTE: If you need access to named buckets/proofs etc, use call_method_with_name_lookup
instead.
pub fn call_metadata_method( self, address: impl ReferencedManifestGlobalAddress, method_name: impl Into<String>, arguments: impl ResolvableArguments, ) -> ManifestBuilder<M>
pub fn call_royalty_method( self, address: impl ReferencedManifestGlobalAddress, method_name: impl Into<String>, arguments: impl ResolvableArguments, ) -> ManifestBuilder<M>
pub fn call_direct_access_method( self, address: InternalAddress, method_name: impl Into<String>, arguments: impl ResolvableArguments, ) -> ManifestBuilder<M>
pub fn set_owner_role( self, address: impl ReferencedManifestGlobalAddress, rule: impl Into<AccessRule>, ) -> ManifestBuilder<M>
pub fn lock_owner_role( self, address: impl ReferencedManifestGlobalAddress, ) -> ManifestBuilder<M>
pub fn set_main_role( self, address: impl ReferencedManifestGlobalAddress, role_key: impl Into<RoleKey>, rule: impl Into<AccessRule>, ) -> ManifestBuilder<M>
pub fn set_role( self, address: impl ReferencedManifestGlobalAddress, role_module: ModuleId, role_key: impl Into<RoleKey>, rule: impl Into<AccessRule>, ) -> ManifestBuilder<M>
pub fn get_role( self, address: impl ReferencedManifestGlobalAddress, role_module: ModuleId, role_key: RoleKey, ) -> ManifestBuilder<M>
pub fn call_role_assignment_method( self, address: impl ReferencedManifestGlobalAddress, method_name: impl Into<String>, arguments: impl ResolvableArguments, ) -> ManifestBuilder<M>
pub fn call_module_method( self, address: impl ReferencedManifestGlobalAddress, module_id: ModuleId, method_name: impl Into<String>, arguments: impl ResolvableArguments, ) -> ManifestBuilder<M>
Sourcepub fn call_method_raw(
self,
address: impl ReferencedManifestGlobalAddress,
method_name: impl Into<String>,
arguments: Value<ManifestCustomValueKind, ManifestCustomValue>,
) -> ManifestBuilder<M>
pub fn call_method_raw( self, address: impl ReferencedManifestGlobalAddress, method_name: impl Into<String>, arguments: Value<ManifestCustomValueKind, ManifestCustomValue>, ) -> ManifestBuilder<M>
Calls a scrypto method where the arguments are a raw ManifestValue. The caller is required to ensure the ManifestValue is a Tuple.
You should prefer call_function or call_function_with_name_lookup instead.
Sourcepub fn call_method_with_name_lookup<T>(
self,
address: impl ReferencedManifestGlobalAddress,
method_name: impl Into<String>,
arguments_creator: impl FnOnce(&ManifestNameLookup) -> T,
) -> ManifestBuilder<M>where
T: ResolvableArguments,
pub fn call_method_with_name_lookup<T>(
self,
address: impl ReferencedManifestGlobalAddress,
method_name: impl Into<String>,
arguments_creator: impl FnOnce(&ManifestNameLookup) -> T,
) -> ManifestBuilder<M>where
T: ResolvableArguments,
Calls a scrypto method where the arguments will be created using the given
callback, which takes a lookup (allowing for resolving named buckets, proofs, etc)
and returns resolvable arguments.
The resolvable arguments should be one of:
- A tuple, such as
(),(x,)or(x, y, z)- IMPORTANT: If calling with a single argument, you must include a trailing comma in the tuple declaration. This ensures that the rust compiler knows it’s a singleton tuple, rather than just some brackets around the inner value.
- A struct which implements
ManifestEncoderepresenting the arguments manifest_args!(x, y, z)
Example:
let manifest = ManifestBuilder::new()
.lock_fee_from_faucet()
.withdraw_from_account(from_account_address, XRD, dec!(1))
.take_from_worktop(XRD, dec!(1), "xrd_bucket")
.call_method_with_name_lookup(
component_address,
"some_method",
|lookup| (
"argument1",
lookup.bucket("xrd_bucket"),
dec!("1.3")
),
)
.build();
// Alternative using `then`
let manifest2 = ManifestBuilder::new()
.lock_fee_from_faucet()
.withdraw_from_account(from_account_address, XRD, dec!(1))
.take_from_worktop(XRD, dec!(1), "xrd_bucket")
.then(|builder| {
let lookup = builder.name_lookup();
builder.call_method(
component_address,
"some_method",
("argument1", lookup.bucket("xrd_bucket"), dec!("1.3")),
)
})
.build();pub fn claim_package_royalties( self, package_address: impl ReferencedManifestPackageAddress, ) -> ManifestBuilder<M>
pub fn set_component_royalty( self, component_address: impl ReferencedManifestComponentAddress, method: impl Into<String>, amount: RoyaltyAmount, ) -> ManifestBuilder<M>
pub fn lock_component_royalty( self, component_address: impl ReferencedManifestComponentAddress, method: impl Into<String>, ) -> ManifestBuilder<M>
pub fn claim_component_royalties( self, component_address: impl ReferencedManifestComponentAddress, ) -> ManifestBuilder<M>
pub fn set_metadata( self, address: impl ReferencedManifestGlobalAddress, key: impl Into<String>, value: impl ToMetadataEntry, ) -> ManifestBuilder<M>
pub fn lock_metadata( self, address: impl ReferencedManifestGlobalAddress, key: impl Into<String>, ) -> ManifestBuilder<M>
pub fn freeze_metadata( self, address: impl ReferencedManifestGlobalAddress, key: impl Into<String>, ) -> ManifestBuilder<M>
Sourcepub fn publish_package_advanced(
self,
address_reservation: impl ConsumedOptionalManifestAddressReservation,
code: Vec<u8>,
definition: PackageDefinition,
metadata: impl Into<KeyValueStoreInit<String, GenericMetadataValue<UncheckedUrl, UncheckedOrigin>>>,
owner_role: OwnerRole,
) -> ManifestBuilder<M>
pub fn publish_package_advanced( self, address_reservation: impl ConsumedOptionalManifestAddressReservation, code: Vec<u8>, definition: PackageDefinition, metadata: impl Into<KeyValueStoreInit<String, GenericMetadataValue<UncheckedUrl, UncheckedOrigin>>>, owner_role: OwnerRole, ) -> ManifestBuilder<M>
Publishes a package.
Sourcepub fn publish_package(
self,
code: Vec<u8>,
definition: PackageDefinition,
) -> ManifestBuilder<M>
pub fn publish_package( self, code: Vec<u8>, definition: PackageDefinition, ) -> ManifestBuilder<M>
Publishes a package with an owner badge.
Sourcepub fn publish_package_with_owner(
self,
code: Vec<u8>,
definition: PackageDefinition,
owner_badge: NonFungibleGlobalId,
) -> ManifestBuilder<M>
pub fn publish_package_with_owner( self, code: Vec<u8>, definition: PackageDefinition, owner_badge: NonFungibleGlobalId, ) -> ManifestBuilder<M>
Publishes a package with an owner badge.
Sourcepub fn new_token_mutable(
self,
metadata: ModuleConfig<KeyValueStoreInit<String, GenericMetadataValue<UncheckedUrl, UncheckedOrigin>>>,
owner_role: AccessRule,
) -> ManifestBuilder<M>
pub fn new_token_mutable( self, metadata: ModuleConfig<KeyValueStoreInit<String, GenericMetadataValue<UncheckedUrl, UncheckedOrigin>>>, owner_role: AccessRule, ) -> ManifestBuilder<M>
Creates a token resource with mutable supply.
Sourcepub fn new_token_fixed(
self,
owner_role: OwnerRole,
metadata: ModuleConfig<KeyValueStoreInit<String, GenericMetadataValue<UncheckedUrl, UncheckedOrigin>>>,
initial_supply: impl Resolve<Decimal>,
) -> ManifestBuilder<M>
pub fn new_token_fixed( self, owner_role: OwnerRole, metadata: ModuleConfig<KeyValueStoreInit<String, GenericMetadataValue<UncheckedUrl, UncheckedOrigin>>>, initial_supply: impl Resolve<Decimal>, ) -> ManifestBuilder<M>
Creates a token resource with fixed supply.
Sourcepub fn new_badge_mutable(
self,
metadata: ModuleConfig<KeyValueStoreInit<String, GenericMetadataValue<UncheckedUrl, UncheckedOrigin>>>,
owner_role: AccessRule,
) -> ManifestBuilder<M>
pub fn new_badge_mutable( self, metadata: ModuleConfig<KeyValueStoreInit<String, GenericMetadataValue<UncheckedUrl, UncheckedOrigin>>>, owner_role: AccessRule, ) -> ManifestBuilder<M>
Creates a badge resource with mutable supply.
Sourcepub fn new_badge_fixed(
self,
owner_role: OwnerRole,
metadata: ModuleConfig<KeyValueStoreInit<String, GenericMetadataValue<UncheckedUrl, UncheckedOrigin>>>,
initial_supply: impl Resolve<Decimal>,
) -> ManifestBuilder<M>
pub fn new_badge_fixed( self, owner_role: OwnerRole, metadata: ModuleConfig<KeyValueStoreInit<String, GenericMetadataValue<UncheckedUrl, UncheckedOrigin>>>, initial_supply: impl Resolve<Decimal>, ) -> ManifestBuilder<M>
Creates a badge resource with fixed supply.
pub fn burn_resource( self, bucket: impl ConsumedManifestBucket, ) -> ManifestBuilder<M>
pub fn burn_from_worktop( self, amount: impl Resolve<Decimal>, resource_address: impl ResolvableStaticManifestResourceAddress, ) -> ManifestBuilder<M>
pub fn burn_all_from_worktop( self, resource_address: impl ResolvableStaticManifestResourceAddress, ) -> ManifestBuilder<M>
pub fn burn_non_fungible_from_worktop( self, non_fungible_global_id: NonFungibleGlobalId, ) -> ManifestBuilder<M>
pub fn mint_fungible( self, resource_address: impl ReferencedManifestResourceAddress, amount: impl Resolve<Decimal>, ) -> ManifestBuilder<M>
pub fn mint_non_fungible<T, V>( self, resource_address: impl ReferencedManifestResourceAddress, entries: T, ) -> ManifestBuilder<M>
pub fn mint_ruid_non_fungible<T, V>(
self,
resource_address: impl ReferencedManifestResourceAddress,
entries: T,
) -> ManifestBuilder<M>where
T: IntoIterator<Item = V>,
V: ManifestEncode,
pub fn recall( self, vault_address: InternalAddress, amount: impl Resolve<Decimal>, ) -> ManifestBuilder<M>
pub fn recall_non_fungibles( self, vault_address: InternalAddress, non_fungible_local_ids: impl IntoIterator<Item = NonFungibleLocalId>, ) -> ManifestBuilder<M>
pub fn freeze_withdraw(self, vault_id: InternalAddress) -> ManifestBuilder<M>
pub fn unfreeze_withdraw(self, vault_id: InternalAddress) -> ManifestBuilder<M>
pub fn freeze_deposit(self, vault_id: InternalAddress) -> ManifestBuilder<M>
pub fn unfreeze_deposit(self, vault_id: InternalAddress) -> ManifestBuilder<M>
pub fn freeze_burn(self, vault_id: InternalAddress) -> ManifestBuilder<M>
pub fn unfreeze_burn(self, vault_id: InternalAddress) -> ManifestBuilder<M>
Sourcepub fn new_account_advanced(
self,
owner_role: OwnerRole,
address_reservation: impl ConsumedOptionalManifestAddressReservation,
) -> ManifestBuilder<M>
pub fn new_account_advanced( self, owner_role: OwnerRole, address_reservation: impl ConsumedOptionalManifestAddressReservation, ) -> ManifestBuilder<M>
Creates an account.
pub fn new_account(self) -> ManifestBuilder<M>
pub fn lock_fee_and_withdraw( self, account_address: impl ReferencedManifestComponentAddress, amount_to_lock: impl Resolve<Decimal>, resource_address: impl ResolvableStaticManifestResourceAddress, amount: impl Resolve<Decimal>, ) -> ManifestBuilder<M>
pub fn lock_fee_and_withdraw_non_fungibles( self, account_address: impl ReferencedManifestComponentAddress, amount_to_lock: impl Resolve<Decimal>, resource_address: impl ResolvableStaticManifestResourceAddress, ids: impl IntoIterator<Item = NonFungibleLocalId>, ) -> ManifestBuilder<M>
Sourcepub fn lock_fee_from_faucet(self) -> ManifestBuilder<M>
pub fn lock_fee_from_faucet(self) -> ManifestBuilder<M>
Locks a large fee from the faucet.
Sourcepub fn lock_standard_test_fee(
self,
account_address: impl ReferencedManifestComponentAddress,
) -> ManifestBuilder<M>
pub fn lock_standard_test_fee( self, account_address: impl ReferencedManifestComponentAddress, ) -> ManifestBuilder<M>
Locks a large fee from the XRD vault of an account.
Sourcepub fn lock_fee(
self,
account_address: impl ReferencedManifestComponentAddress,
amount: impl Resolve<Decimal>,
) -> ManifestBuilder<M>
pub fn lock_fee( self, account_address: impl ReferencedManifestComponentAddress, amount: impl Resolve<Decimal>, ) -> ManifestBuilder<M>
Locks a fee from the XRD vault of an account.
pub fn lock_contingent_fee( self, account_address: impl ReferencedManifestComponentAddress, amount: impl Resolve<Decimal>, ) -> ManifestBuilder<M>
Sourcepub fn get_free_xrd_from_faucet(self) -> ManifestBuilder<M>
pub fn get_free_xrd_from_faucet(self) -> ManifestBuilder<M>
Locks a large fee from the faucet.
Sourcepub fn withdraw_from_account(
self,
account_address: impl ReferencedManifestComponentAddress,
resource_address: impl ResolvableStaticManifestResourceAddress,
amount: impl Resolve<Decimal>,
) -> ManifestBuilder<M>
pub fn withdraw_from_account( self, account_address: impl ReferencedManifestComponentAddress, resource_address: impl ResolvableStaticManifestResourceAddress, amount: impl Resolve<Decimal>, ) -> ManifestBuilder<M>
Withdraws resource from an account.
Sourcepub fn withdraw_non_fungible_from_account(
self,
account_address: impl ReferencedManifestComponentAddress,
non_fungible_global_id: NonFungibleGlobalId,
) -> ManifestBuilder<M>
pub fn withdraw_non_fungible_from_account( self, account_address: impl ReferencedManifestComponentAddress, non_fungible_global_id: NonFungibleGlobalId, ) -> ManifestBuilder<M>
Withdraws a single non-fungible from an account.
Sourcepub fn withdraw_non_fungibles_from_account(
self,
account_address: impl ReferencedManifestComponentAddress,
resource_address: impl ResolvableStaticManifestResourceAddress,
ids: impl IntoIterator<Item = NonFungibleLocalId>,
) -> ManifestBuilder<M>
pub fn withdraw_non_fungibles_from_account( self, account_address: impl ReferencedManifestComponentAddress, resource_address: impl ResolvableStaticManifestResourceAddress, ids: impl IntoIterator<Item = NonFungibleLocalId>, ) -> ManifestBuilder<M>
Withdraws non-fungibles from an account.
Sourcepub fn burn_in_account(
self,
account_address: impl ReferencedManifestComponentAddress,
resource_address: impl ResolvableStaticManifestResourceAddress,
amount: impl Resolve<Decimal>,
) -> ManifestBuilder<M>
pub fn burn_in_account( self, account_address: impl ReferencedManifestComponentAddress, resource_address: impl ResolvableStaticManifestResourceAddress, amount: impl Resolve<Decimal>, ) -> ManifestBuilder<M>
Withdraws resource from an account.
Sourcepub fn burn_non_fungible_in_account(
self,
account_address: impl ReferencedManifestComponentAddress,
non_fungible_global_id: NonFungibleGlobalId,
) -> ManifestBuilder<M>
pub fn burn_non_fungible_in_account( self, account_address: impl ReferencedManifestComponentAddress, non_fungible_global_id: NonFungibleGlobalId, ) -> ManifestBuilder<M>
Burns a single non-fungible from an account.
Sourcepub fn burn_non_fungibles_in_account(
self,
account_address: impl ReferencedManifestComponentAddress,
resource_address: impl ResolvableStaticManifestResourceAddress,
local_ids: impl IntoIterator<Item = NonFungibleLocalId>,
) -> ManifestBuilder<M>
pub fn burn_non_fungibles_in_account( self, account_address: impl ReferencedManifestComponentAddress, resource_address: impl ResolvableStaticManifestResourceAddress, local_ids: impl IntoIterator<Item = NonFungibleLocalId>, ) -> ManifestBuilder<M>
Burns non-fungibles from an account.
Sourcepub fn create_proof_from_account_of_amount(
self,
account_address: impl ReferencedManifestComponentAddress,
resource_address: impl ResolvableStaticManifestResourceAddress,
amount: impl Resolve<Decimal>,
) -> ManifestBuilder<M>
pub fn create_proof_from_account_of_amount( self, account_address: impl ReferencedManifestComponentAddress, resource_address: impl ResolvableStaticManifestResourceAddress, amount: impl Resolve<Decimal>, ) -> ManifestBuilder<M>
Creates resource proof from an account.
Sourcepub fn create_proof_from_account_of_non_fungible(
self,
account_address: impl ReferencedManifestComponentAddress,
non_fungible_global_id: NonFungibleGlobalId,
) -> ManifestBuilder<M>
pub fn create_proof_from_account_of_non_fungible( self, account_address: impl ReferencedManifestComponentAddress, non_fungible_global_id: NonFungibleGlobalId, ) -> ManifestBuilder<M>
Creates resource proof from an account.
Sourcepub fn create_proof_from_account_of_non_fungibles(
self,
account_address: impl ReferencedManifestComponentAddress,
resource_address: impl ResolvableStaticManifestResourceAddress,
local_ids: impl IntoIterator<Item = NonFungibleLocalId>,
) -> ManifestBuilder<M>
pub fn create_proof_from_account_of_non_fungibles( self, account_address: impl ReferencedManifestComponentAddress, resource_address: impl ResolvableStaticManifestResourceAddress, local_ids: impl IntoIterator<Item = NonFungibleLocalId>, ) -> ManifestBuilder<M>
Creates resource proof from an account.
pub fn deposit( self, account_address: impl ReferencedManifestComponentAddress, bucket: impl ConsumedManifestBucket, ) -> ManifestBuilder<M>
Sourcepub fn deposit_batch(
self,
account_address: impl ReferencedManifestComponentAddress,
batch: impl ConsumedBucketBatch,
) -> ManifestBuilder<M>
pub fn deposit_batch( self, account_address: impl ReferencedManifestComponentAddress, batch: impl ConsumedBucketBatch, ) -> ManifestBuilder<M>
Note - the batch should either be:
ManifestExpression::EntireWorktop,- An array, vec, or btreeset of bucket names or ManifestBuckets, eg
["my_bucket_1", "my_bucket_2"] - An empty, explicitly typed array of strings, eg
Vec::<String>::new()
pub fn deposit_entire_worktop( self, account_address: impl ReferencedManifestComponentAddress, ) -> ManifestBuilder<M>
pub fn try_deposit_or_abort( self, account_address: impl ReferencedManifestComponentAddress, authorized_depositor_badge: Option<ResourceOrNonFungible>, bucket: impl ConsumedManifestBucket, ) -> ManifestBuilder<M>
Sourcepub fn try_deposit_batch_or_abort(
self,
account_address: impl ReferencedManifestComponentAddress,
batch: impl ConsumedBucketBatch,
authorized_depositor_badge: Option<ResourceOrNonFungible>,
) -> ManifestBuilder<M>
pub fn try_deposit_batch_or_abort( self, account_address: impl ReferencedManifestComponentAddress, batch: impl ConsumedBucketBatch, authorized_depositor_badge: Option<ResourceOrNonFungible>, ) -> ManifestBuilder<M>
Note - the batch should either be:
ManifestExpression::EntireWorktop,- An array, vec, or btreeset of bucket names or ManifestBuckets, eg
["my_bucket_1", "my_bucket_2"] - An empty, explicitly typed array of strings, eg
Vec::<String>::new()
pub fn try_deposit_entire_worktop_or_abort( self, account_address: impl ReferencedManifestComponentAddress, authorized_depositor_badge: Option<ResourceOrNonFungible>, ) -> ManifestBuilder<M>
pub fn try_deposit_or_refund( self, account_address: impl ReferencedManifestComponentAddress, authorized_depositor_badge: Option<ResourceOrNonFungible>, bucket: impl ConsumedManifestBucket, ) -> ManifestBuilder<M>
Sourcepub fn try_deposit_batch_or_refund(
self,
account_address: impl ReferencedManifestComponentAddress,
batch: impl ConsumedBucketBatch,
authorized_depositor_badge: Option<ResourceOrNonFungible>,
) -> ManifestBuilder<M>
pub fn try_deposit_batch_or_refund( self, account_address: impl ReferencedManifestComponentAddress, batch: impl ConsumedBucketBatch, authorized_depositor_badge: Option<ResourceOrNonFungible>, ) -> ManifestBuilder<M>
Note - the batch should either be:
ManifestExpression::EntireWorktop,- An array, vec, or btreeset of bucket names or ManifestBuckets, eg
["my_bucket_1", "my_bucket_2"] - An empty, explicitly typed array of strings, eg
Vec::<String>::new()
pub fn try_deposit_entire_worktop_or_refund( self, account_address: impl ReferencedManifestComponentAddress, authorized_depositor_badge: Option<ResourceOrNonFungible>, ) -> ManifestBuilder<M>
pub fn create_account_with_owner( self, address_reservation: impl ConsumedOptionalManifestAddressReservation, owner_role: OwnerRole, ) -> ManifestBuilder<M>
pub fn create_access_controller( self, controlled_asset: impl ConsumedManifestBucket, primary_role: AccessRule, recovery_role: AccessRule, confirmation_role: AccessRule, timed_recovery_delay_in_minutes: Option<u32>, ) -> ManifestBuilder<M>
Source§impl<M> ManifestBuilder<M>
impl<M> ManifestBuilder<M>
pub fn assert_worktop_is_empty(self) -> ManifestBuilder<M>
pub fn assert_worktop_resources_only( self, constraints: ManifestResourceConstraints, ) -> ManifestBuilder<M>
pub fn assert_worktop_resources_include( self, constraints: ManifestResourceConstraints, ) -> ManifestBuilder<M>
pub fn assert_next_call_returns_no_resources(self) -> ManifestBuilder<M>
pub fn assert_next_call_returns_only( self, constraints: ManifestResourceConstraints, ) -> ManifestBuilder<M>
pub fn assert_next_call_returns_include( self, constraints: ManifestResourceConstraints, ) -> ManifestBuilder<M>
pub fn assert_bucket_contents( self, bucket: impl ReferencedManifestBucket, constraint: ManifestResourceConstraint, ) -> ManifestBuilder<M>
Source§impl<M> ManifestBuilder<M>where
M: BuildableManifestSupportingChildren,
<M as TypedReadableManifest>::Instruction: From<InstructionV2>,
impl<M> ManifestBuilder<M>where
M: BuildableManifestSupportingChildren,
<M as TypedReadableManifest>::Instruction: From<InstructionV2>,
pub fn use_child( self, child_name: impl NewManifestIntent, subintent_hash: SubintentHash, ) -> ManifestBuilder<M>
pub fn yield_to_child( self, child_manifest_intent: impl ReferencedManifestIntent, arguments: impl ResolvableArguments, ) -> ManifestBuilder<M>
pub fn yield_to_child_with_name_lookup<T>(
self,
child_manifest_intent: impl ReferencedManifestIntent,
arguments_creator: impl FnOnce(&ManifestNameLookup) -> T,
) -> ManifestBuilder<M>where
T: ResolvableArguments,
Source§impl<M> ManifestBuilder<M>where
M: BuildableManifestWithParent,
<M as TypedReadableManifest>::Instruction: From<InstructionV2>,
impl<M> ManifestBuilder<M>where
M: BuildableManifestWithParent,
<M as TypedReadableManifest>::Instruction: From<InstructionV2>,
pub fn yield_to_parent( self, arguments: impl ResolvableArguments, ) -> ManifestBuilder<M>
pub fn yield_to_parent_with_name_lookup<T>(
self,
arguments_creator: impl FnOnce(&ManifestNameLookup) -> T,
) -> ManifestBuilder<M>where
T: ResolvableArguments,
pub fn verify_parent(self, access_rule: AccessRule) -> ManifestBuilder<M>
Trait Implementations§
Source§impl Default for ManifestBuilder
impl Default for ManifestBuilder
Source§fn default() -> ManifestBuilder
fn default() -> ManifestBuilder
Auto Trait Implementations§
impl<M> Freeze for ManifestBuilder<M>where
M: Freeze,
impl<M = TransactionManifestV1> !RefUnwindSafe for ManifestBuilder<M>
impl<M = TransactionManifestV1> !Send for ManifestBuilder<M>
impl<M = TransactionManifestV1> !Sync for ManifestBuilder<M>
impl<M> Unpin for ManifestBuilder<M>where
M: Unpin,
impl<M = TransactionManifestV1> !UnwindSafe for ManifestBuilder<M>
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
Source§impl<T, U> ContextualTryInto<U> for Twhere
U: ContextualTryFrom<T>,
impl<T, U> ContextualTryInto<U> for Twhere
U: ContextualTryFrom<T>,
type Error = <U as ContextualTryFrom<T>>::Error
type Context = <U as ContextualTryFrom<T>>::Context
fn contextual_try_into( self, context: &<U as ContextualTryFrom<T>>::Context, ) -> Result<U, <U as ContextualTryFrom<T>>::Error>
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
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.Source§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.Source§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.Source§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<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