Skip to main content

fmt_c_char_enum

Function fmt_c_char_enum 

Source
pub fn fmt_c_char_enum<E, F>(
    f: &mut String,
    field_name: &str,
    raw: c_char,
    parser: F,
) -> Result
where E: WritePyRepr, F: FnOnce() -> Result<E>,
Available on crate feature python only.
Expand description

Format a c_char field that should be displayed as a Python enum. Falls back to char representation if parsing fails.

ยงErrors

This function returns an error if it fails to expand the buffer to fit the string.