Function englishid::decode_with_custom_header[][src]

pub fn decode_with_custom_header<F: FnOnce(u16) -> usize + 'static>(
    englishid: &str,
    callback: F
) -> Result<Vec<u8>, Error>
Expand description

Decodes englishid that was previously encoded using encode_with_custom_header(). After parsing the embedded header, callback is invoked with the value. The callback is responsible for returning the number of bytes the result is expected to contain.

Errors

  • Error::EmptyInput: englishid was empty.
  • Error::UnknownWord: An unrecognized word was encountered.