Skip to main content

fmt_enum_method

Function fmt_enum_method 

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

Format an enum value obtained via a method call.

ยงErrors

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