[][src]Function xed_sys::xed_encode

pub unsafe extern "C" fn xed_encode(
    r: *mut xed_encoder_request_t,
    array: *mut u8,
    ilen: c_uint,
    olen: *mut c_uint
) -> xed_error_enum_t

This is the main interface to the encoder. The array should be at most 15 bytes long. The ilen parameter should indicate this length. If the array is too short, the encoder may fail to encode the request. Failure is indicated by a return value of type #xed_error_enum_t that is not equal to #XED_ERROR_NONE. Otherwise, #XED_ERROR_NONE is returned and the length of the encoded instruction is returned in olen.

@param r encoder request description (#xed_encoder_request_t), includes mode info @param array the encoded instruction bytes are stored here @param ilen the input length of array. @param olen the actual length of array used for encoding @return success/failure as a #xed_error_enum_t @ingroup ENC