Trait novax_data::NativeConvertible
source · pub trait NativeConvertible {
type Native;
// Required method
fn to_native(&self) -> Self::Native;
}Expand description
Provides a bridge from a complex smart contract type, managed by the MultiversX virtual machine, to a common Rust type.
This trait facilitates the conversion from managed types to native Rust types. The conversion is one-way and is designed to map multiple managed types to a single Rust type, establishing a many-to-one relationship.
Implementing this trait requires specifying the associated Native type
and providing an implementation for the to_native method, which will carry
out the actual conversion.
Type Parameters
Native: The native Rust type to which the managed type will be converted.
Methods
to_native: Performs the conversion from the managed type to the specified native Rust type.