Module radix_engine_interface::prelude
source · 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::object_modules::metadata::*;
pub use crate::object_modules::role_assignment::*;
pub use crate::object_modules::royalty::*;
pub use crate::types::*;
Macros§
- 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) - 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)