Skip to main content

write_result

Function write_result 

Source
pub fn write_result<T>(
    w: &mut Writer,
    v: &Result<T, String>,
    ok: impl FnOnce(&mut Writer, &T),
)
Expand description

Encode a Result<T, String>: tag 0 = ok, tag 1 = the error message.