GLib.Variant.prototype.get_size
function get_size(): Number(gsize) { // Gjs wrapper for g_variant_get_size() }
Determines the number of bytes that would be required to store value with GLib.Variant.prototype.store.
If value has a fixed-sized type then this function always returned that fixed size.
In the case that value is already in serialised form or the size has already been calculated (ie: this function has been called before) then this function is O(1). Otherwise, the size is calculated, an operation which is approximately O(n) in the number of values involved.
Since 2.24
- Returns
the serialised size of value