application capa

application-contact

Forge contact module — contact channels (phone, email, website) for parties + places.

Forge contact module — contact channels (phone, email, website) for parties + places.

Tierapplication
Roleunclassified (baselined)
Pathcrates/application/contact
Edition2024
Targetsapplication_contact, pg_forge_contact
Public items16 across 2 modules
Tests37

What it is for

application-contact — contact channels for parties and places.

Capabilities

ContactModule

application-contact — contact channels for parties and places.

Item
pub struct ContactModule
ContactModule :: fn new() -> Self
ContactModule :: fn name(& self) -> & 'static str
ContactModule :: fn version(& self) -> & 'static str
ContactModule :: fn migrations(& self) -> Vec <MigrationSet>
ContactModule :: async fn migrate_pending(& self, pool : & PgPool) -> std::result::Result <u32, MigrationError>
ContactModule :: fn permission_codes(& self) -> Vec <String>

api::contacts_admin (other)

Contact-channels admin REST router.

Item
pub const PERM_READ: & str
pub const PERM_WRITE: & str
fn to_dto(c : & Contact) -> ContactChannelDto
fn router <S>() -> Router <S> where S : Clone + Send + Sync + 'static, PgPool : FromRef <S>,

ContactRequestError

Contact-channels admin REST router.

Item
pub enum ContactRequestError
fn contact_from_create(tenant_id : Uuid, req : & CreateContactChannelRequest,) -> Result <Contact, ContactRequestError>
fn apply_update_fields(existing : & Contact, req : & UpdateContactChannelRequest,) -> Result <(ContactType, Option <ContactPurpose>, String, Option <String>, Option <String>,), ContactRequestError,>

ListContactsQuery

Contact-channels admin REST router.

Item
pub struct ListContactsQuery

TenantQuery

Contact-channels admin REST router.

Item
pub struct TenantQuery

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

application_contact

flowchart TD
  n_application_contact["application_contact"]
  n_application_contact --> n_api["api"]
  n_api --> n_api__contacts_admin["contacts_admin"]

Public surface

`crate root`

ItemWhat it is
pub struct ContactModule
ContactModule :: fn new() -> Self
ContactModule :: fn name(& self) -> & 'static str
ContactModule :: fn version(& self) -> & 'static str
ContactModule :: fn migrations(& self) -> Vec <MigrationSet>
ContactModule :: async fn migrate_pending(& self, pool : & PgPool) -> std::result::Result <u32, MigrationError>
ContactModule :: fn permission_codes(& self) -> Vec <String>

`api::contacts_admin`

ItemWhat it is
pub const PERM_READ: & strPermission code required to read contact channels
pub const PERM_WRITE: & strPermission code required to create/update/delete/set-primary.
pub struct ListContactsQueryGET /contactstenant_id AND party_id are both required, no #serde(default), matching relationships_admin::ListRelationshipsQuery's contract exactly: a request for "every contact in the tenant" with no anchor party isn't served by this admin surface.
pub struct TenantQuery`GET\
pub enum ContactRequestErrorErrors raised before any query runs — either the domain crate's own validation (ContactError, reused rather than re-invented per Gate 0.5) or this router's own field-length ceiling (Gate 1.5.6 item 1, which the domain crate has no opinion on).
fn to_dto(c : & Contact) -> ContactChannelDtoProject a contact onto the wire DTO.
fn contact_from_create(tenant_id : Uuid, req : & CreateContactChannelRequest,) -> Result <Contact, ContactRequestError>Build a new contact from a create request
fn apply_update_fields(existing : & Contact, req : & UpdateContactChannelRequest,) -> Result <(ContactType, Option <ContactPurpose>, String, Option <String>, Option <String>,), ContactRequestError,>Resolve an update request against the existing row — fields absent from the request keep their existing value
fn router <S>() -> Router <S> where S : Clone + Send + Sync + 'static, PgPool : FromRef <S>,Contacts admin router

Re-exports. Exported here, defined elsewhere.

ExportDefined in
routercontacts_admin::router

Boundary

Reaches into domain, platform.

Shares tier application with 120 other crates: application-agreements, application-ai, application-analytics, application-approvals, application-assessments, application-audit-log, application-auth, application-billing, … (120 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)application
Architectural role (taxonomy)unclassified (baselined)
Locationcrates/application/contact
Vocabulary in force (lexicon)current

Tier flow. Which tiers this crate's own edges cross.

flowchart LR
  n_application["application"] --> n_domain["domain"]
  n_application["application"] --> n_platform["platform"]

Dependencies

Runtime, in this workspace.

CrateTierOptionalOnly on
`application-core`applicationnoalways
`application-rbac`applicationnoalways
`domain-contact`domainnoalways
`platform-dto`platformnoalways

Runtime, from outside the workspace.

CrateRequirementFeaturesOptionalOnly on
async-trait^0.1noalways
axum^0.7multipartnoalways
serde^1derivenoalways
sqlx^0.8runtime-tokio, postgres, chrono, uuid, jsonnoalways
tracing^0.1noalways
uuid^1v4, v7, serde, jsnoalways

Development, from outside the workspace.

CrateRequirementFeaturesOptionalOnly on
serde_json^1noalways
tokio^1fullnoalways
tower^0.5noalways

Build. None.

Depended on by. Nothing in this workspace.

Signal flow — what reaches this crate, and what it reaches.

flowchart LR
  SELF["application-contact"]
  SELF -->|runtime| n_application_core["application-core"]
  SELF -->|runtime| n_application_rbac["application-rbac"]
  SELF -->|runtime| n_domain_contact["domain-contact"]
  SELF -->|runtime| n_platform_dto["platform-dto"]
  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

KindNameSource
libapplication_contact`src/lib.rs`
testpg_forge_contact`tests/pg_forge_contact.rs`

Error model

Error typeNamed by
ContactRequestErrorapply_update_fields, contact_from_create

Operational characteristics

PropertyEvidence
async public surfaceyes
async runtimenone detected
database accessyes
network I/Oyes
unsafe codenone detected
environment variablesyes

No unsafe block, unsafe fn, unsafe impl or unsafe trait was found by the parser anywhere in this crate's source.

Configuration

VariableRead in
CARGO_PKG_VERSIONsrc/lib.rs

No workspace crate depends on this one.

Verification

KindCount
Unit tests29
Integration tests8
Examples0
Doctests0

Evidence by module. How often each public module is named by something executable.

ModuleTestsExamplesConsumers
crate root100
api::contacts_admin900

What the tests establish, by name:

Documentation coverage

MeasureDocumentedTotal
Public items with rustdoc916
Public modules with a //! block22
pie showData
    title Public items with rustdoc
    "Documented" : 9
    "No rustdoc detected" : 7

Metrics

MetricValue
Rust source files3
Source lines1138
Code lines919
Public API items16
Public modules2
Tests37
Examples0
Cargo features0
Direct runtime dependencies10
Workspace reverse dependencies0
pie showData
    title Public API by kind
    "constant" : 2
    "enum" : 1
    "function" : 4
    "method" : 6
    "struct" : 3
pie showData
    title Rust source composition
    "Code" : 919
    "Blank or comment" : 219

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.

Todas las application · Manual