pub trait ROrd {
// Required method
fn r_cmp(&self, other: &Self) -> i32;
// Provided method
#[doc(hidden)] unsafe extern "C" fn __ROrd_r_cmp_shim(
data: *mut c_void,
argc: i32,
argv: *const SEXP,
) -> SEXP
where Self: Sized + ROrd + TypedExternal + Send + 'static { ... }
}Expand description
Adapter trait for std::cmp::Ord.
Provides total ordering comparison for R sorting operations.
Automatically implemented for any type that implements Ord.
§Methods
r_cmp(&self, other: &Self)(cmp()in R) - Returns -1, 0, or 1
§Example
ⓘ
#[derive(Ord, PartialOrd, Eq, PartialEq, ExternalPtr)]
struct Priority(u32);
#[miniextendr]
impl miniextendr_api::adapter_traits::ROrd for Priority {}Required Methods§
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".