Skip to main content

nghttp2_error_callback

Type Alias nghttp2_error_callback 

Source
pub type nghttp2_error_callback = Option<unsafe extern "C" fn(session: *mut nghttp2_session, msg: *const c_char, len: usize, user_data: *mut c_void) -> c_int>;
Expand description

@functypedef

.. warning::

Deprecated. Use :type:nghttp2_error_callback2 instead.

Callback function invoked when library provides the error message intended for human consumption. This callback is solely for debugging purpose. The |msg| is typically NULL-terminated string of length |len|. |len| does not include the sentinel NULL character.

The format of error message may change between nghttp2 library versions. The application should not depend on the particular format.

Normally, application should return 0 from this callback. If fatal error occurred while doing something in this callback, application should return :enum:nghttp2_error.NGHTTP2_ERR_CALLBACK_FAILURE. In this case, library will return immediately with return value :enum:nghttp2_error.NGHTTP2_ERR_CALLBACK_FAILURE. Currently, if nonzero value is returned from this callback, they are treated as :enum:nghttp2_error.NGHTTP2_ERR_CALLBACK_FAILURE, but application should not rely on this details.

Aliased Type§

pub enum nghttp2_error_callback {
    None,
    Some(unsafe extern "C" fn(*mut nghttp2_session, *const i8, usize, *mut c_void) -> i32),
}

Variants§

§1.0.0

None

No value.

§1.0.0

Some(unsafe extern "C" fn(*mut nghttp2_session, *const i8, usize, *mut c_void) -> i32)

Some value of type T.