Expand description
Each module should have its own prelude, which:
- Adds preludes of upstream crates
- Exports types with specific-enough names which mean they can safely be used downstream.
The idea is that we can just include the current crate’s prelude and avoid messing around with tons of includes. This makes refactors easier, and makes integration into the node less painful.
Re-exports§
pub use crate::object_modules::ModuleConfig;
pub use crate::api::actor_api::*;
pub use crate::api::field_api::*;
pub use crate::api::key_value_entry_api::*;
pub use crate::api::key_value_store_api::*;
pub use crate::api::*;
pub use crate::blueprints::consensus_manager::*;
pub use crate::blueprints::locker::*;
pub use crate::blueprints::resource::*;
pub use crate::blueprints::utils::*;
pub use crate::object_modules::metadata::*;
pub use crate::object_modules::role_assignment::*;
pub use crate::object_modules::royalty::*;
pub use crate::types::*;
Macros§
- access_
and_ or - burn_
roles - composite_
requirement - dec
- Creates a
Decimal
from literals. It is a compile-time macro. It allows to declare constants and statics. Example: const D1: Decimal = dec!(“1111.11111”) const D2: Decimal = dec!(“-1111.11111”) const D3: Decimal = dec!(1) const D4: Decimal = dec!(-1_0000_000_u128) - deposit_
roles - freeze_
roles - internal_
roles - metadata
- metadata_
init - metadata_
init_ set_ entry - metadata_
roles - mint_
roles - non_
fungible_ data_ update_ roles - pdec
- Creates a
PreciseDecimal
from literals. It is a compile-time macro. It allows to declare constants and statics. Example: const D1: PreciseDecimal = pdec!(“1111.11111”) const D2: PreciseDecimal = pdec!(“-1111.11111”) const D3: PreciseDecimal = pdec!(1) const D4: PreciseDecimal = pdec!(-1_0000_000_u128) - recall_
roles - role_
entry - roles2
- rule
- withdraw_
roles