Trait bones_schema::raw_fns::RawEq

source ·
pub trait RawEq {
    // Required method
    unsafe fn raw_eq(a: *const c_void, b: *const c_void) -> bool;

    // Provided method
    fn raw_eq_cb(    ) -> Unsafe<&'static (dyn Fn(*const c_void, *const c_void) -> bool + Sync + Send + 'static)> { ... }
}
Expand description

Trait implemented automatically for types that implement Eq that can compare two values through their pointers.

Required Methods§

source

unsafe fn raw_eq(a: *const c_void, b: *const c_void) -> bool

Get the hash of the type.

§Safety

The pointer must be aligned, readable, and be a pointer to the type that this Hash function was created for.

Provided Methods§

source

fn raw_eq_cb() -> Unsafe<&'static (dyn Fn(*const c_void, *const c_void) -> bool + Sync + Send + 'static)>

Get a callback suitable for SchemaData.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<T: Eq> RawEq for T