GLib.Variant.new_from_bytes

function new_from_bytes(type: GLib.VariantType, bytes: ByteArray, trusted: Boolean): GLib.Variant {
    // Gjs wrapper for g_variant_new_from_bytes()
}
  

Constructs a new serialised-mode GLib.Variant instance. This is the inner interface for creation of new serialised values that gets called from various functions in gvariant.c.

A reference is taken on bytes.

Since 2.36

type

a GLib.VariantType

bytes

a GLib.Bytes

trusted

if the contents of bytes are trusted

Returns

a new GLib.Variant with a floating reference