TagBinding
类型: 类
领域: 其他公共符号
推荐导入: from cadflow import TagBinding
签名
class TagBinding(tag: 'str', producer: 'TagProducer', scope: 'TagBindingScope' = <factory>, target: 'TagTarget' = <factory>, propagation: 'TagPropagation' = <factory>, evidence: 'TagEvidence' = <factory>, attachment: 'TagAttachment | str' = <TagAttachment.LOCAL: 'local'>, certainty: 'TagCertainty | str' = <TagCertainty.ASSERTED: 'asserted'>, lifecycle: 'TagLifecycle | str' = <TagLifecycle.ASSERTION: 'assertion'>, binding_id: 'str' = <factory>, schema_version: 'str' = '1.0') -> None
功能说明
TagBinding 是 CadFlow 其他公共符号领域的公共类。
原始 API 说明
Canonical, source-preserving Semantic Binding Schema 1.0 assignment.
参数
| 名称 | 类型 | 必需 | 默认值 | 源码说明 |
|---|---|---|---|---|
tag | 'str' | 是 | - | 源码 Docstring 未单独说明。 |
producer | 'TagProducer' | 是 | - | 源码 Docstring 未单独说明。 |
scope | 'TagBindingScope' | 否 | <factory> | 源码 Docstring 未单独说明。 |
target | 'TagTarget' | 否 | <factory> | 源码 Docstring 未单独说明。 |
propagation | 'TagPropagation' | 否 | <factory> | 源码 Docstring 未单独说明。 |
evidence | 'TagEvidence' | 否 | <factory> | 源码 Docstring 未单独说明。 |
attachment | 'TagAttachment | str' | 否 | <TagAttachment.LOCAL: 'local'> | 源码 Docstring 未单独说明。 |
certainty | 'TagCertainty | str' | 否 | <TagCertainty.ASSERTED: 'asserted'> | 源码 Docstring 未单独说明。 |
lifecycle | 'TagLifecycle | str' | 否 | <TagLifecycle.ASSERTION: 'assertion'> | 源码 Docstring 未单独说明。 |
binding_id | 'str' | 否 | <factory> | 源码 Docstring 未单独说明。 |
schema_version | 'str' | 否 | '1.0' | 源码 Docstring 未单独说明。 |
返回值
类型: None
源码 Docstring 未声明更多返回语义。
异常
源码 Docstring 未声明更窄的异常契约。类型、数值、所有权、路径或后端状态无效时,仍可能抛出相应公共异常。
数据字段
| 名称 | 类型 | 默认值 |
|---|---|---|
tag | 'str' | required |
producer | 'TagProducer' | required |
scope | 'TagBindingScope' | factory |
target | 'TagTarget' | factory |
propagation | 'TagPropagation' | factory |
evidence | 'TagEvidence' | factory |
attachment | 'TagAttachment | str' | <TagAttachment.LOCAL: 'local'> |
certainty | 'TagCertainty | str' | <TagCertainty.ASSERTED: 'asserted'> |
lifecycle | 'TagLifecycle | str' | <TagLifecycle.ASSERTION: 'assertion'> |
binding_id | 'str' | factory |
schema_version | 'str' | '1.0' |
公共成员
| 成员 | 类型 | 签名 | 说明 |
|---|---|---|---|
from_dict | class method | (cls, data: 'Mapping[str, Any]') -> "'TagBinding'" | 见成员签名。 |
to_dict | method | (self) -> 'Dict[str, Any]' | 见成员签名。 |
行为与约束
- 实例是不可变 dataclass 值;更新式工作流会返回替代值。
导入检查
from cadflow import TagBinding