pub fn decode_paint(
version: u32,
document: &[u8],
) -> Result<PaintDocument, DecodePaintError>Expand description
Decodes a surface paint document of version.
ยงErrors
DecodePaintError::UnknownVersion for a version other than 1 or 2, and
DecodePaintError::Malformed for a document that breaks a rule of
section 10.1. Either way a reader treats the entry as absent.