pub type nanocbor_encoder_fits = Option<unsafe extern "C" fn(enc: *mut nanocbor_encoder_t, ctx: *mut c_void, len: size_t) -> bool>;
Expand description

@brief Fits function for streaming encoder data

This function is called to check whether the data that will be supplied can be consumed by the interface.

The append function will only be called if this function returns true. The amount of bytes checked by this call can be used by multiple successive @ref nanocbor_encoder_append calls

@param enc The encoder context struct @param ctx The context ptr supplied in the @ref nanocbor_encoder_stream_init call @param len Length of the data in bytes that will be supplied

Aliased Type§

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

Variants§

§1.0.0

None

No value.

§1.0.0

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

Some value of type T.