Skip to main content

from_bytes

Function from_bytes 

Source
pub fn from_bytes(ty: &Type, data: &[u8]) -> Result<Value, Error>
Expand description

Deserialize normal-form GVariant bytes as ty.

The parser is strict: any deviation from normal form (nonzero padding, unterminated or non-UTF-8 strings, out-of-order framing offsets, trailing bytes) is an error. A successful parse therefore re-serializes to the identical bytes, which is what object checksumming relies on.