VariantType

class VariantType(**kwargs)
Constructors:

new(type_string:str) -> GLib.VariantType
new_array(element:GLib.VariantType) -> GLib.VariantType
new_dict_entry(key:GLib.VariantType, value:GLib.VariantType) -> GLib.VariantType
new_maybe(element:GLib.VariantType) -> GLib.VariantType
new_tuple(items:list) -> GLib.VariantType

Constructors

class VariantType
classmethod new(type_string: str) VariantType
Parameters:

type_string

classmethod new_array(element: VariantType) VariantType
Parameters:

element

classmethod new_dict_entry(key: VariantType, value: VariantType) VariantType
Parameters:
  • key

  • value

classmethod new_maybe(element: VariantType) VariantType
Parameters:

element

classmethod new_tuple(items: Sequence[VariantType]) VariantType
Parameters:

items

Methods

class VariantType
checked_(type_string: str) VariantType
Parameters:

type_string

dup_string() str
element() VariantType
equal(type2: VariantType) bool
Parameters:

type2

first() VariantType
free() None
get_string_length() int
hash() int
is_array() bool
is_basic() bool
is_container() bool
is_definite() bool
is_dict_entry() bool
is_maybe() bool
is_subtype_of(supertype: VariantType) bool
Parameters:

supertype

is_tuple() bool
is_variant() bool
key() VariantType
n_items() int
next() VariantType
string_get_depth_(type_string: str) int
Parameters:

type_string

string_is_valid(type_string: str) bool
Parameters:

type_string

string_scan(string: str, limit: str | None = None) tuple[bool, str]
Parameters:
  • string

  • limit

value() VariantType