GLib.Variant.new_variant

function new_variant(value: GLib.Variant): GLib.Variant {
    // Gjs wrapper for g_variant_new_variant()
}
  

Boxes value. The result is a GLib.Variant instance representing a variant containing the original value.

If @child is a floating reference (see GLib.Variant.prototype.ref_sink), the new instance takes ownership of @child.

Since 2.24

value

a GLib.Variant instance

Returns

a floating reference to a new variant GLib.Variant instance