[][src]Function mynewt::encoding::tinycbor::cbor_encoder_create_array

pub unsafe extern "C" fn cbor_encoder_create_array(
    encoder: *mut CborEncoder,
    arrayEncoder: *mut CborEncoder,
    length: usize
) -> CborError

Creates a CBOR array in the CBOR stream provided by \a encoder and initializes \a arrayEncoder so that items can be added to the array using the CborEncoder functions. The array must be terminated by calling either cbor_encoder_close_container() or cbor_encoder_close_container_checked() with the same \a encoder and \a arrayEncoder parameters.

The number of items inserted into the array must be exactly \a length items, otherwise the stream is invalid. If the number of items is not known when creating the array, the constant \ref CborIndefiniteLength may be passed as length instead.

\sa cbor_encoder_create_map