SignatureType

class dbus_next.SignatureType(token: str)

A class that represents a single complete type within a signature.

This class is not meant to be constructed directly. Use the SignatureTree class to parse signatures.

Variables
  • signature (str) – The signature of this complete type.

  • children (list(SignatureType)) – A list of child types if this is a container type. Arrays have one child type, dict entries have two child types (key and value), and structs have child types equal to the number of struct members.

validators = {'(': <function SignatureType._verify_struct>, 'a': <function SignatureType._verify_array>, 'b': <function SignatureType._verify_boolean>, 'd': <function SignatureType._verify_double>, 'g': <function SignatureType._verify_signature>, 'h': <function SignatureType._verify_uint32>, 'i': <function SignatureType._verify_int32>, 'n': <function SignatureType._verify_int16>, 'o': <function SignatureType._verify_string>, 'q': <function SignatureType._verify_uint16>, 's': <function SignatureType._verify_string>, 't': <function SignatureType._verify_uint64>, 'u': <function SignatureType._verify_uint32>, 'v': <function SignatureType._verify_variant>, 'x': <function SignatureType._verify_int64>, 'y': <function SignatureType._verify_byte>}
verify(body: Any)bool

Verify that the body matches this type.

Returns

True if the body matches this type.

Raises

SignatureBodyMismatchError if the body does not match this type.