#[no_mangle]
pub unsafe extern "C" fn iohk_jormungandr_fragment_id(
    fragment: FragmentPtr,
    fragment_id_out: *mut u8
) -> ErrorPtr
Expand description

get the ID of the provided fragment

Parameters

  • fragment – a pointer to fragment.
  • fragment_id_out – a pointer to a pre-allocated 32 bytes array.

Errors

This function would return an error if either of the provided pointers is null.

Safety

This function dereference raw pointers. Even though the function checks if the pointers are null. Mind not to put random values in or you may see unexpected behaviors.

fragment_id_out is expected to be an already allocated 32 byte array. Doing otherwise may potentially result into an undefined behavior.