[][src]Struct ocaml::custom::CustomOps

#[repr(C)]pub struct CustomOps {
    pub identifier: *const Char,
    pub finalize: Option<unsafe extern "C" fn(v: Value)>,
    pub compare: Option<unsafe extern "C" fn(v1: Value, v2: Value) -> i32>,
    pub hash: Option<unsafe extern "C" fn(v: Value) -> Int>,
    pub serialize: Option<unsafe extern "C" fn(v: Value, bsize_32: *mut Uint, bsize_64: *mut Uint)>,
    pub deserialize: Option<unsafe extern "C" fn(dst: *mut c_void) -> Uint>,
    pub compare_ext: Option<unsafe extern "C" fn(v1: Value, v2: Value) -> i32>,
    pub fixed_length: *const custom_fixed_length,
}

CustomOps duplicates sys::custom::custom_operations to provide a slightly nicer experience in Rust

This should rarely be constructed manually, custom! simplifies the process of creating custom types.

See the struct custom_operations section in the OCaml manual for more information about each field

Fields

identifier: *const Charfinalize: Option<unsafe extern "C" fn(v: Value)>compare: Option<unsafe extern "C" fn(v1: Value, v2: Value) -> i32>hash: Option<unsafe extern "C" fn(v: Value) -> Int>serialize: Option<unsafe extern "C" fn(v: Value, bsize_32: *mut Uint, bsize_64: *mut Uint)>deserialize: Option<unsafe extern "C" fn(dst: *mut c_void) -> Uint>compare_ext: Option<unsafe extern "C" fn(v1: Value, v2: Value) -> i32>fixed_length: *const custom_fixed_length

Trait Implementations

impl Clone for CustomOps[src]

impl Default for CustomOps[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.