Variant.from_bytes
Description:
[ Version ( since = "2.36" ) ]
public Variant.from_bytes (VariantType type, Bytes bytes, bool trusted)
public Variant.from_bytes (VariantType type, Bytes bytes, bool trusted)
Constructs a new serialized-mode Variant instance.
This is the inner interface for creation of new serialized values that gets called from various functions in gvariant.c.
A reference is taken on bytes
.
The data in bytes
must be aligned appropriately for the type
being loaded. Otherwise this function will internally
create a copy of the memory (since GLib 2.60) or (in older versions) fail and exit the process.
Parameters:
type | |
bytes |
a Bytes |
trusted |
if the contents of |
Returns:
a new Variant with a floating reference |