Trait bones_framework::lib::prelude::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 + Send + Sync)> { ... }
}
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 + Send + Sync)>

Get a callback suitable for [SchemaData].

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<T> RawEq for T
where T: Eq,