Contracts
yosoi::contracts
pub mod contracts
Describe typed records and inspect extraction and validation outcomes.
Source: crates/yosoi/src/contracts.rs:1
| Name | Kind | Summary |
|---|---|---|
CandidateField |
struct | Owned ordered findings for one field before conversion to the declared type T. |
Cardinality |
enum | Required number of accepted field values, enforced during validation rather than extraction. |
Contract |
trait | Typed record schema linking authored meaning to generated candidate evidence. |
ContractId |
struct | Authored identity distinguishing one record Contract schema from another. |
ContractIdentity |
struct | Stable SHA-256 identity of portable Contract schema semantics, displayed as lowercase hex. |
ContractLocatorError |
enum | Pinned Contract locator declarations failed query construction or portable plan compilation. |
ContractOutcome |
enum | Typed evaluation preserving accepted records, rejected records, and terminal evidence states. |
ContractSchema |
struct | Validated portable record schema; it defines meaning without locating or validating evidence. |
ContractSchemaError |
enum | Portable Contract metadata rejected during construction, deserialization, or identity hashing. |
ContractValue |
trait | Stable semantic identity for a Contract field value type. |
Extracted |
type alias | Model-shaped candidates awaiting explicit runtime validation. |
ExtractionDiagnostic |
enum | Nonfatal structural issue while mapping located findings into Contract candidate groups. |
ExtractionFailure |
enum | Schema or resource failure rejecting candidate assembly as an operation. |
ExtractionLimit |
enum | Resource counter charged during candidate assembly, before value validation. |
FieldId |
struct | Authored field identity associating locator outputs with Contract field evidence. |
FieldIssue |
struct | Field-level rejection with retained locator evidence for caller inspection. |
FieldIssueKind |
enum | Field rejection category, separate from operation-level validation-budget failures. |
FieldSchema |
struct | Owned field meaning, cardinality, and conversion type metadata for a Contract schema. |
RecordIssue |
struct | Rejected candidate record with retained field-level explanations and evidence. |
RecordScope |
enum | Boundary used to group located evidence into candidate records. |
RuntimeCandidate |
type alias | Owned field evidence for one runtime-described Contract candidate. |
RuntimeContract |
struct | Runtime-authored Contract adapter with the same default Policy-derived extraction limits as a derive-backed Contract. |
RuntimeContractError |
enum | Runtime Contract construction failure for a schema outside the supported value vocabulary. |
RuntimeContractOutcome |
enum | Runtime Contract evaluation preserving successes, rejected records, and terminal evidence states. |
RuntimeExtracted |
struct | Runtime candidate extraction awaiting explicit validation. |
RuntimeFieldValue |
enum | Converted field value retaining its authored cardinality distinction. |
RuntimeRecordIssue |
struct | One rejected runtime candidate with its field issues and original evidence. |
RuntimeValidatedRecord |
struct | One accepted runtime record with the original candidate evidence retained. |
RuntimeValue |
enum | Converted scalar value from the runtime Contract’s supported vocabulary. |
ValidateContract |
trait | Generic access to a Contract’s existing extraction and validation path. Deriving Contract supplies this adapter; no new field conversion is implied. |
ValidatedRecord |
struct | Accepted typed record retaining its original extraction evidence. |
ValidationFailure |
enum | Schema or resource failure rejecting validation as an operation. |
Macros
Section titled “Macros”| Name | Kind | Summary |
|---|---|---|
Contract |
proc macro | Defines portable record meaning and explicit extraction/validation helpers for a named struct. |
Exports
Section titled “Exports”| Name | Kind | Summary |
|---|---|---|
ArchivedContractOutcome |
reexport | — |
RuntimeContractArchiveError |
reexport | — |