Skip to main content

hurray_descriptor_field_u64_array

Function hurray_descriptor_field_u64_array 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn hurray_descriptor_field_u64_array( handle: *const HurrayDescriptor, field: HurrayDescriptorField, level: u32, out_values: *mut u64, out_len: *mut usize, ) -> HurrayStatus
Expand description

Reads an unsigned array field of the descriptor.

Uses the capacity/length in-out pattern hurray_descriptor_shape uses:

  1. Set *out_len to the capacity of out_values in elements, or 0 if out_values is null.
  2. On return *out_len always holds the field’s true length.
  3. A null out_values or an insufficient capacity returns HURRAY_ERR_BUFFER_TOO_SMALL, so the caller can allocate and retry.

§Errors

As hurray_descriptor_field_u64, plus HURRAY_ERR_BUFFER_TOO_SMALL per the protocol above.

§Safety

  • handle and out_len MUST be valid, non-null pointers.
  • If out_values is non-null it MUST be writable for capacity × 8 bytes, where capacity is the value at *out_len on entry.