libosdp_sys

Type Alias osdp_read_fn_t

Source
pub type osdp_read_fn_t = Option<unsafe extern "C" fn(data: *mut c_void, buf: *mut u8, maxlen: c_int) -> c_int>;
Expand description

@brief pointer to function that copies received bytes into buffer. This function should be non-blocking.

@param data for use by underlying layers. osdp_channel::data is passed @param buf byte array copy incoming data @param maxlen sizeof buf. Can copy utmost maxlen bytes into buf

@retval +ve: number of bytes copied on to buf. Must be <= len @retval -ve on errors

Aliased Type§

enum osdp_read_fn_t {
    None,
    Some(unsafe extern "C" fn(_: *mut c_void, _: *mut u8, _: i32) -> i32),
}

Variants§

§1.0.0

None

No value.

§1.0.0

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

Some value of type T.