pub fn decode_sparse_response(
buf: &[u8],
) -> Result<SparseResponse, SparseWireError>Expand description
Decode a wire-format sparse response. Refuses any input larger than
SPARSE_WIRE_MAX_BYTES before parsing.
§Errors
SparseWireError::Truncated— buffer ended mid-field.SparseWireError::BadMagic— magic prefix mismatch.SparseWireError::UnsupportedVersion— version byte mismatch.SparseWireError::TooManyLeaves— claimedleaf_count > MAX_LEAVES. Refused before any allocation.SparseWireError::LengthOutOfBounds— a length prefix exceeds the remaining buffer.SparseWireError::InvalidEntryMode— an entry mode byte is not a recognisedEntryMode.SparseWireError::InvalidEntryName— an entry name length is outside the 1..=255 SPEC-OBJECTS bound.