pub unsafe trait ContractTrait<DynTrait>where
DynTrait: ?Sized,{ }Expand description
A trait that indicates the implementation of a contract trait by a contract.
DynTrait here is dyn ContractTrait, which is a bit of a hack that allows treating a trait as
a type for convenient API in native execution environment.
Do not implement this trait explicitly! Implementation is automatically generated by the
macro which generates contract trait implementation. This trait is required, but not sufficient
for proper trait implementation, use #[contract] attribute macro instead.
NOTE: It is unlikely to be necessary to interact with this directly.
§Safety
The native executor relies on each entry of Self::NATIVE_EXECUTOR_METHODS containing the
fingerprint and metadata of a method of this trait, and an FFI function that accepts arguments
of that exact method and handles them the way the FFI functions generated by #[contract] do.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".