Skip to main content

parse_find_value_response_ext

Function parse_find_value_response_ext 

Source
pub fn parse_find_value_response_ext(
    remainder: &[u8],
) -> Result<FindValueResponseExt, Error>
Expand description

Parse the trailing FindValueResponseExt bytes returned as the remainder by crate::decode_message after a DhtMessage::FindValueResponse.

An empty remainder ⇒ FindValueResponseExt::default. Trailing bytes beyond the known fields are tolerated for forward compatibility (ADR 013 §Tier 1).

§Errors

Returns a postcard::Error if a non-empty remainder is not a valid FindValueResponseExt prefix. While FindValueResponseExt holds no fields it consumes no bytes and cannot fail; the signature carries the error so that adding the first field is a pure append here too.