pub type TidyReportCallback = Option<unsafe extern "C" fn(tdoc: TidyDoc, lvl: TidyReportLevel, line: uint, col: uint, code: ctmbstr, args: *mut __va_list_tag) -> Bool>;Expand description
This typedef represents the required signature for your provided callback
function should you wish to register one with tidySetReportCallback().
Your callback function will be provided with the following parameters.
@param tdoc Indicates the tidy document the message comes from.
@param lvl Specifies the TidyReportLevel of the message.
@param line Indicates the line number in the source document the message applies to.
@param col Indicates the column in the source document the message applies to.
@param code Specifies the message code representing the message. Note that
this code is a string value that the API promises to hold constant,
as opposed to an enum value that can change at any time. Although
this is intended so that you can look up your own application’s
strings, you can retrieve Tidy’s format string with this code by
using tidyErrorCodeFromKey() and then the tidyLocalizedString()
family of functions.
@param args Is a va_list of arguments used to fill Tidy’s message format string.
@return Your callback function will return yes if Tidy should include the
report in its own output sink, or no if Tidy should suppress it.
Aliased Type§
pub enum TidyReportCallback {
None,
Some(unsafe extern "C" fn(*const _TidyDoc, TidyReportLevel, u32, u32, *const i8, *mut __va_list_tag) -> u32),
}