Skip to main content

Module types

Module types 

Source
Expand description

Swift type generation and collection.

This module handles:

  • Collecting named types (structs and enums) from service definitions
  • Generating Swift type definitions (structs, enums)
  • Converting Rust types to Swift type strings

Functionsยง

collect_named_types
Collect all named types (structs and enums with a name) from a service. Returns a vector of (name, Shape) pairs in dependency order.
format_doc
Format documentation comments for Swift.
generate_named_types
Generate Swift type definitions for all named types.
is_channel
Check if a shape represents a channel type (Tx or Rx).
swift_scalar_type
Convert ScalarType to Swift type string.
swift_type_base
Convert Shape to Swift type string.
swift_type_client_arg
Convert Shape to Swift type string for client arguments.
swift_type_client_return
Convert Shape to Swift type string for client returns.
swift_type_server_arg
Convert Shape to Swift type string for server/handler arguments.
swift_type_server_return
Convert Shape to Swift type string for server returns.