Skip to main content

is_binary

Function is_binary 

Source
pub fn is_binary(err: &Error) -> bool
Expand description

Whether the error peels as binary/NUL content (EditErrorKind::Binary).

Distinct from is_invalid_input (argument mistakes) and is_invalid_encoding (non-UTF-8 text without NUL). Hosts that recover overwrite of non-text priors should branch on this (or is_invalid_encoding) rather than all of InvalidInput (#1963).