RawEq

Trait 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.

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.

Implementors§

Source§

impl<T: Eq> RawEq for T