Travel compliance: health certificates, screening exams, import/export requirements
| Tier | domain |
| Role | unclassified (baselined) |
| Path | crates/domain/travel-compliance |
| Edition | 2021 |
| Targets | domain_travel_compliance |
| Public items | 38 across 0 modules |
| Tests | 36 |
What it is for
This crate does not document itself. No //! block on its entry point. The facts below are complete; the reason this crate exists is not written down anywhere, and belongs in src/lib.rs rather than here.
Capabilities
CertificateSequence
_No module-level documentation is present in the source._
| Item |
|---|
pub struct CertificateSequence |
CertificateSequence :: fn new(prefix : & str, year : u16) -> Self |
CertificateSequence :: fn generate_number(& mut self) -> String |
CertificateStatus
_No module-level documentation is present in the source._
| Item |
|---|
pub enum CertificateStatus |
CertificateType
_No module-level documentation is present in the source._
| Item |
|---|
pub enum CertificateType |
FindingSeverity
_No module-level documentation is present in the source._
| Item |
|---|
pub enum FindingSeverity |
HealthCertificate
_No module-level documentation is present in the source._
| Item |
|---|
pub struct HealthCertificate |
HealthCertificate :: fn is_expired(& self) -> bool |
HealthCertificate :: fn is_valid(& self) -> bool |
HealthCertificate :: fn transition_to(& mut self, new_status : CertificateStatus,) -> Result <(), TravelComplianceError> |
HealthCertificate :: fn revoke(& mut self, reason : & str) -> Result <(), TravelComplianceError> |
HealthCertificate :: fn id(& self) -> Uuid |
HealthCertificate :: fn created_at(& self) -> DateTime <Utc> |
HealthCertificate :: fn updated_at(& self) -> DateTime <Utc> |
HealthCertificate :: fn deleted_at(& self) -> Option <DateTime <Utc>> |
InspectionSite
_No module-level documentation is present in the source._
| Item |
|---|
pub enum InspectionSite |
RequirementType
_No module-level documentation is present in the source._
| Item |
|---|
pub enum RequirementType |
RiskLevel
_No module-level documentation is present in the source._
| Item |
|---|
pub enum RiskLevel |
ScreeningExam
_No module-level documentation is present in the source._
| Item |
|---|
pub struct ScreeningExam |
ScreeningExam :: fn transition_to(& mut self, new_status : ScreeningStatus,) -> Result <(), TravelComplianceError> |
ScreeningExam :: fn record_review(& mut self, vet_id : Uuid, override_score : Option <u8>) |
ScreeningExam :: fn effective_score(& self) -> Option <u8> |
ScreeningExam :: fn has_critical_findings(& self) -> bool |
ScreeningExam :: fn id(& self) -> Uuid |
ScreeningExam :: fn created_at(& self) -> DateTime <Utc> |
ScreeningExam :: fn updated_at(& self) -> DateTime <Utc> |
ScreeningExam :: fn deleted_at(& self) -> Option <DateTime <Utc>> |
ScreeningFinding
_No module-level documentation is present in the source._
| Item |
|---|
pub struct ScreeningFinding |
ScreeningFinding :: fn id(& self) -> Uuid |
ScreeningStatus
_No module-level documentation is present in the source._
| Item |
|---|
pub enum ScreeningStatus |
ScreeningType
_No module-level documentation is present in the source._
| Item |
|---|
pub enum ScreeningType |
TravelComplianceError
_No module-level documentation is present in the source._
| Item |
|---|
pub enum TravelComplianceError |
TravelPurpose
_No module-level documentation is present in the source._
| Item |
|---|
pub enum TravelPurpose |
TravelRequirement
_No module-level documentation is present in the source._
| Item |
|---|
pub struct TravelRequirement |
TravelRequirement :: fn id(& self) -> Uuid |
TravelRequirement :: fn created_at(& self) -> DateTime <Utc> |
TravelRequirement :: fn updated_at(& self) -> DateTime <Utc> |
TravelRequirement :: fn deleted_at(& self) -> Option <DateTime <Utc>> |
How to use it
No examples/ target and no doctest in this crate's rustdoc. The tests listed under Verification are the closest executable usage.
Module structure
No public modules: the crate root is its whole surface.
Public surface
`crate root`
| Item | What it is |
|---|---|
pub enum InspectionSite | Body area to inspect during screening (screwworm predilection sites). |
pub enum RiskLevel | Risk level from a screening. |
pub enum ScreeningType | Type of screening examination. |
pub enum ScreeningStatus | Status of a screening examination. |
pub enum FindingSeverity | Severity of a finding during screening. |
pub enum CertificateType | Type of health certificate. |
pub enum TravelPurpose | Purpose of travel. |
pub enum CertificateStatus | Status of a health certificate. |
pub enum RequirementType | Type of import/export requirement. |
pub enum TravelComplianceError | Error types for travel compliance operations. |
pub struct ScreeningFinding | A finding from a screening examination. |
ScreeningFinding :: fn id(& self) -> Uuid | — |
pub struct ScreeningExam | A screening examination (screwworm, tick, etc). |
ScreeningExam :: fn transition_to(& mut self, new_status : ScreeningStatus,) -> Result <(), TravelComplianceError> | Transition the screening to a new status (state machine) |
ScreeningExam :: fn record_review(& mut self, vet_id : Uuid, override_score : Option <u8>) | Record a vet review with optional score override. |
ScreeningExam :: fn effective_score(& self) -> Option <u8> | Get the effective score (vet override takes precedence over AI). |
ScreeningExam :: fn has_critical_findings(& self) -> bool | Check if the screening has any high or critical findings. |
ScreeningExam :: fn id(& self) -> Uuid | — |
ScreeningExam :: fn created_at(& self) -> DateTime <Utc> | — |
ScreeningExam :: fn updated_at(& self) -> DateTime <Utc> | — |
ScreeningExam :: fn deleted_at(& self) -> Option <DateTime <Utc>> | — |
pub struct HealthCertificate | Health certificate for travel. |
HealthCertificate :: fn is_expired(& self) -> bool | Check if the certificate has expired. |
HealthCertificate :: fn is_valid(& self) -> bool | Check if the certificate is currently valid. |
HealthCertificate :: fn transition_to(& mut self, new_status : CertificateStatus,) -> Result <(), TravelComplianceError> | Transition the certificate to a new status (state machine) |
HealthCertificate :: fn revoke(& mut self, reason : & str) -> Result <(), TravelComplianceError> | Revoke the certificate with a reason |
HealthCertificate :: fn id(& self) -> Uuid | — |
HealthCertificate :: fn created_at(& self) -> DateTime <Utc> | — |
HealthCertificate :: fn updated_at(& self) -> DateTime <Utc> | — |
HealthCertificate :: fn deleted_at(& self) -> Option <DateTime <Utc>> | — |
pub struct TravelRequirement | Import/export requirement for a country pair. |
TravelRequirement :: fn id(& self) -> Uuid | — |
TravelRequirement :: fn created_at(& self) -> DateTime <Utc> | — |
TravelRequirement :: fn updated_at(& self) -> DateTime <Utc> | — |
TravelRequirement :: fn deleted_at(& self) -> Option <DateTime <Utc>> | — |
pub struct CertificateSequence | Certificate number sequence generator. |
CertificateSequence :: fn new(prefix : & str, year : u16) -> Self | Create a new sequence with the given prefix and year. |
CertificateSequence :: fn generate_number(& mut self) -> String | Generate the next certificate number. |
No pub use re-exports: every item above is declared in this crate.
Boundary
Reaches into foundation, identity.
Shares tier domain with 41 other crates: domain-agreements, domain-ai-report, domain-billing, domain-catalog, domain-classify, domain-comments, domain-competitive-intel, domain-contact, … (41 total).
_What this crate deliberately does NOT own is a judgment. No committed registry records one for it, so none is stated here._
Where it sits
| Tier (ontology) | domain |
| Architectural role (taxonomy) | unclassified (baselined) |
| Location | crates/domain/travel-compliance |
| Vocabulary in force (lexicon) | current |
Tier flow. Which tiers this crate's own edges cross.
flowchart LR n_domain["domain"] --> n_foundation["foundation"] n_domain["domain"] --> n_identity["identity"]
Dependencies
Runtime, in this workspace.
| Crate | Tier | Optional | Only on |
|---|---|---|---|
| `foundation-basemodels` | foundation | no | always |
| `identity-parties` | identity | no | always |
Runtime, from outside the workspace.
| Crate | Requirement | Features | Optional | Only on |
|---|---|---|---|---|
chrono | ^0.4 | serde | no | always |
serde | ^1 | derive | no | always |
serde_json | ^1 | — | no | always |
thiserror | ^2 | — | no | always |
uuid | ^1 | v4, v7, serde, js | no | always |
Development, from outside the workspace.
| Crate | Requirement | Features | Optional | Only on |
|---|---|---|---|---|
tokio-test | ^0.4 | — | no | always |
Build. None.
Depended on by. 1 workspace crate.
Signal flow — what reaches this crate, and what it reaches.
flowchart LR n_application_travel_compliance["application-travel-compliance"] -->|uses| SELF SELF["domain-travel-compliance"] SELF -->|runtime| n_foundation_basemodels["foundation-basemodels"] SELF -->|runtime| n_identity_parties["identity-parties"] classDef self fill:#1f883d,stroke:#1f883d,color:#fff; class SELF self;
Feature flags
No Cargo features are defined: every capability is unconditional, so no consumer can receive a half-wired crate.
Targets
| Kind | Name | Source |
|---|---|---|
| lib | domain_travel_compliance | `src/lib.rs` |
Error model
| Error type | Named by |
|---|---|
TravelComplianceError | declared, no public signature returns it |
Operational characteristics
| Property | Evidence |
|---|---|
| async public surface | none detected |
| async runtime | none detected |
| database access | none detected |
| network I/O | none detected |
| unsafe code | none detected |
| environment variables | none detected |
No unsafe block, unsafe fn, unsafe impl or unsafe trait was found by the parser anywhere in this crate's source.
Configuration
No environment variable is read with a literal name anywhere in this crate. A variable whose key is computed at run time cannot be listed here, and is not claimed to be absent.
Related capabilities
1 workspace crate depends on this one: application-travel-compliance.
Verification
| Kind | Count |
|---|---|
| Unit tests | 36 |
| Integration tests | 0 |
| Examples | 0 |
| Doctests | 0 |
Evidence by module. How often each public module is named by something executable.
| Module | Tests | Examples | Consumers |
|---|---|---|---|
crate root | 15 | 0 | 1 |
What the tests establish, by name:
test_certificate_cannot_revoke_draft—src/lib.rstest_certificate_expired—src/lib.rstest_certificate_has_id_and_timestamps—src/lib.rstest_certificate_invalid_transition—src/lib.rstest_certificate_is_valid_when_active_and_not_expired—src/lib.rstest_certificate_not_valid_when_draft—src/lib.rstest_certificate_revoke—src/lib.rstest_certificate_sequence_custom_prefix—src/lib.rstest_certificate_sequence_generates_numbers—src/lib.rstest_certificate_sequence_serialization—src/lib.rstest_certificate_serialization—src/lib.rstest_certificate_state_active_to_expired—src/lib.rstest_certificate_state_draft_to_issued—src/lib.rstest_certificate_state_issued_to_active—src/lib.rstest_certificate_type_serialization—src/lib.rstest_inspection_site_other_variant—src/lib.rstest_inspection_site_serialization—src/lib.rstest_requirement_type_serialization—src/lib.rstest_risk_level_variants—src/lib.rstest_screening_ai_complete_to_in_review—src/lib.rstest_screening_effective_score_falls_back_to_ai—src/lib.rstest_screening_effective_score_prefers_vet_override—src/lib.rstest_screening_has_critical_findings—src/lib.rstest_screening_has_id_and_timestamps—src/lib.rstest_screening_in_review_to_certified—src/lib.rstest_screening_in_review_to_escalated—src/lib.rstest_screening_in_review_to_rejected—src/lib.rstest_screening_invalid_transition_certified_to_pending—src/lib.rstest_screening_invalid_transition_pending_to_certified—src/lib.rstest_screening_pending_to_ai_complete—src/lib.rs- _… 6 more_
Documentation coverage
| Measure | Documented | Total |
|---|---|---|
| Public items with rustdoc | 25 | 38 |
Public modules with a //! block | 0 | 0 |
pie showData
title Public items with rustdoc
"Documented" : 25
"No rustdoc detected" : 13
Metrics
| Metric | Value |
|---|---|
| Rust source files | 1 |
| Source lines | 914 |
| Code lines | 767 |
| Public API items | 38 |
| Public modules | 0 |
| Tests | 36 |
| Examples | 0 |
| Cargo features | 0 |
| Direct runtime dependencies | 7 |
| Workspace reverse dependencies | 1 |
pie showData
title Public API by kind
"enum" : 10
"method" : 23
"struct" : 5
pie showData
title Rust source composition
"Code" : 767
"Blank or comment" : 147
Generation
Rendered by tools-corpus corpus readme from repository evidence alone, renderer schema 2, lexicon current. No model, network service or database was consulted. Regenerate with tools-corpus corpus readme --write; verify with --check.