#[repr(C)]pub struct CustomOps {
pub identifier: *const Char,
pub finalize: Option<unsafe extern "C" fn(v: Raw)>,
pub compare: Option<unsafe extern "C" fn(v1: Raw, v2: Raw) -> i32>,
pub hash: Option<unsafe extern "C" fn(v: Raw) -> Int>,
pub serialize: Option<unsafe extern "C" fn(v: Raw, 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: Raw, v2: Raw) -> i32>,
pub fixed_length: *const custom_fixed_length,
}
Expand description
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 Char
finalize: Option<unsafe extern "C" fn(v: Raw)>
compare: Option<unsafe extern "C" fn(v1: Raw, v2: Raw) -> i32>
hash: Option<unsafe extern "C" fn(v: Raw) -> Int>
serialize: Option<unsafe extern "C" fn(v: Raw, 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: Raw, v2: Raw) -> i32>
fixed_length: *const custom_fixed_length
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for CustomOps
impl !Send for CustomOps
impl !Sync for CustomOps
impl Unpin for CustomOps
impl UnwindSafe for CustomOps
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more