Function transmog_versions::decode

source ·
pub fn decode<E: Display, T, R: Read, F: FnOnce(u64, BufReader<R>) -> Result<T, Error<E>>>(
    data: R,
    callback: F
) -> Result<T, Error<E>>
Expand description

Decode a payload that may or may not contain a version header. If no header is found, callback is invoked with 0. If a header is found, the parsed version number is passed to callback.