Skip to main content

Crate wae_types

Crate wae_types 

Source
Expand description

WAE Types - WAE 框架的基础类型定义

提供统一的错误类型、计费维度和工具函数。

作为微服务优先框架的基础层,所有类型都设计为:

  • 异步友好:支持 tokio 运行时
  • 序列化就绪:支持 JSON/MessagePack 等格式
  • 零拷贝:最小化数据复制

Macros§

array
构建数组的便捷宏
dec
Transform a literal number directly to a Decimal at compile time.
object
构建对象的便捷宏

Structs§

BillingCostConfig
四元矩阵成本配置
BillingDimensions
计费维度
Decimal
Decimal represents a 128 bit representation of a fixed-precision decimal number. The finite set of values of type Decimal are of the form m / 10e, where m is an integer such that -296 < m < 296, and e is an integer between 0 and 28 inclusive.
ImageCost
图像成本定义 (每百万像素)
TextCost
文本成本定义 (每百万 Tokens/字符)
WaeError
中心化错误类型

Enums§

ErrorCategory
错误分类
Value
动态值类型
WaeErrorKind
统一错误类型枚举

Functions§

format_slug
Common helper to format display names or slugs
hex_decode
将十六进制字符串解码为字节数组
hex_encode
将字节数组编码为十六进制字符串
truncate_str
Common helper to truncate strings for logging
url_decode
URL 解码字符串
url_encode
URL 编码字符串

Type Aliases§

DatabaseErrorKind
数据库错误类型别名
WaeResult
WAE 结果类型