Skip to content
Back to top
View this page

# TypeStructure

class dsviper.TypeStructure

  Bases: `object`

  A class used to represent a struct type.

  Note: Not directly instantiable.

  static cast(type: Type) → TypeStructure

    Return a type struct or raise.

  check(field_name: str) → TypeStructureField

    Return the field or raise.

  description(*, namespace: NameSpace | None = None) → str

    Return the description.

  documentation() → str

    Return The documentation.

  fields() → list[TypeStructureField]

    Return the list of fields.

  is_compact() → bool

    Return True the type is compact.

  query(field_name: str) → TypeStructureField | None

    Return the field or None.

  representation(*, namespace: NameSpace | None = None) → str

    Return the representation.

  runtime_id() → ValueUUId

    Return the uuid assigned by the runtime.

  type_code() → str

    Return the type code.

  type_name() → TypeName

    Return a TypeName.