Function pact_ffi::models::expressions::pactffi_validate_datetime

source ·
#[no_mangle]
pub extern "C" fn pactffi_validate_datetime(
    value: *const c_char,
    format: *const c_char
) -> c_int
Expand description

Validates the date/time value against the date/time format string. If the value is valid, this function will return a zero status code (EXIT_SUCCESS). If the value is not valid, will return a value of 1 (EXIT_FAILURE) and set the error message which can be retrieved with pactffi_get_error_message.

§Errors

If the function receives a panic, it will return 2 and the message associated with the panic can be retrieved with pactffi_get_error_message.

§Safety

This function is safe as long as the value and format parameters point to valid NULL-terminated strings.