SignatureType

class dbus_fast.SignatureType

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.

children
token
validators = {'(': <cyfunction SignatureType._verify_struct>, 'a': <cyfunction SignatureType._verify_array>, 'b': <cyfunction SignatureType._verify_boolean>, 'd': <cyfunction SignatureType._verify_double>, 'g': <cyfunction SignatureType._verify_signature>, 'h': <cyfunction SignatureType._verify_uint32>, 'i': <cyfunction SignatureType._verify_int32>, 'n': <cyfunction SignatureType._verify_int16>, 'o': <cyfunction SignatureType._verify_string>, 'q': <cyfunction SignatureType._verify_uint16>, 's': <cyfunction SignatureType._verify_string>, 't': <cyfunction SignatureType._verify_uint64>, 'u': <cyfunction SignatureType._verify_uint32>, 'v': <cyfunction SignatureType._verify_variant>, 'x': <cyfunction SignatureType._verify_int64>, 'y': <cyfunction 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.