Type Alias element_serializer

Source
pub type element_serializer = Option<unsafe extern "C" fn(el: *const c_void, serialize_buffer: *mut u32) -> *mut c_void>;
Expand description

a function for serializing an element.

A serializer function is one that gets a reference to an element, and returns a reference to a buffer that contains its serialization along with the length of this buffer. It is responsibility of the function to handle possible NULL values, returning a NULL buffer and a 0 buffer length.

These functions have 3 goals: -# “freeze” and “flatten” the memory representation of the element -# provide a portable (wrt byte order, or type size) representation of the element, if the dump can be used on different sw/hw combinations -# possibly extract a compressed representation of the element

@param el reference to the element data @param serialize_buffer reference to fill with the length of the buffer @return reference to the buffer with the serialized data

Aliased Type§

enum element_serializer {
    None,
    Some(unsafe extern "C" fn(_: *const c_void, _: *mut u32) -> *mut c_void),
}

Variants§

§1.0.0

None

No value.

§1.0.0

Some(unsafe extern "C" fn(_: *const c_void, _: *mut u32) -> *mut c_void)

Some value of type T.