pub trait ScriptOrd {
// Required method
fn script_cmp(origin: Origin, lhs: Arg, rhs: Arg) -> RuntimeResult<Ordering>;
}
Expand description
A script full ordering operator: lhs >= rhs
, lhs < rhs
, etc.
Implementing this trait enables the Object::ord operation.
The trait must be implemented for the registered type, and the implementation must be exported using the export macro. For more details, see the module documentation.
Required Methods§
Sourcefn script_cmp(origin: Origin, lhs: Arg, rhs: Arg) -> RuntimeResult<Ordering>
fn script_cmp(origin: Origin, lhs: Arg, rhs: Arg) -> RuntimeResult<Ordering>
Operation implementation.
The parameters and return type of this function correspond to those of the Object::ord function.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.