Provider-agnostic source ingest abstraction for collecting third-party data streams
| Tier | foundation |
| Role | unclassified (baselined) |
| Path | crates/foundation/source-ingest |
| Edition | 2021 |
| Targets | foundation_source_ingest |
| Public items | 5 across 2 modules |
| Tests | 3 |
What it is for
# foundation-source-ingest
Provider-agnostic abstraction for ingesting data from third-party sources.
This crate defines the core SourceIngest trait and associated types, enabling pluggable implementations for various data sources (e.g., APIs, feeds, scanners). The trait is industry-agnostic; implementors bring source-specific logic without coupling the interface to any particular domain.
See README.md for design rationale and usage examples.
Capabilities
SourceIngestError
Error types for source ingest operations.
| Item |
|---|
pub enum SourceIngestError |
IngestResult
Core types for the SourceIngest abstraction.
| Item |
|---|
pub struct IngestResult |
IngestResult :: fn merge(& mut self, other : IngestResult) |
Result
Core types for the SourceIngest abstraction.
| Item |
|---|
pub type Result<T>: StdResult <T, SourceIngestError> |
SourceIngest
Core types for the SourceIngest abstraction.
| Item |
|---|
pub trait SourceIngest |
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
foundation_source_ingest
errortypes
flowchart TD n_foundation_source_ingest["foundation_source_ingest"] n_foundation_source_ingest --> n_error["error"] n_foundation_source_ingest --> n_types["types"]
Public surface
`error`
| Item | What it is |
|---|---|
pub enum SourceIngestError | Errors that may occur during source ingest operations. |
`types`
| Item | What it is |
|---|---|
pub type Result<T>: StdResult <T, SourceIngestError> | Result type for source ingest operations. |
pub trait SourceIngest | Provider-agnostic trait for ingesting data from a third-party source |
pub struct IngestResult | The result of a source ingest operation |
IngestResult :: fn merge(& mut self, other : IngestResult) | Merge another IngestResult into this one |
Re-exports. Exported here, defined elsewhere.
| Export | Defined in |
|---|---|
SourceIngestError | error::SourceIngestError |
{IngestResult,Result,SourceIngest} | types::{IngestResult,Result,SourceIngest} |
Boundary
Depends on no other workspace tier.
Shares tier foundation with 27 other crates: foundation-audit-log, foundation-basemodels, foundation-bounded-io, foundation-conversation-closure, foundation-crypto-sign, foundation-decisioning, foundation-encounter-vocabulary, foundation-fs-metadata, … (27 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) | foundation |
| Architectural role (taxonomy) | unclassified (baselined) |
| Location | crates/foundation/source-ingest |
| Vocabulary in force (lexicon) | current |
Dependencies
Runtime, from outside the workspace.
| Crate | Requirement | Features | Optional | Only on |
|---|---|---|---|---|
async-trait | ^0.1 | — | no | always |
serde | ^1 | derive | no | always |
serde_json | ^1 | — | no | always |
thiserror | ^2 | — | no | always |
Development, from outside the workspace.
| Crate | Requirement | Features | Optional | Only on |
|---|---|---|---|---|
tokio | ^1 | full | no | always |
tokio-test | ^0.4 | — | no | always |
Build. None.
Depended on by. 3 workspace crates.
Signal flow — what reaches this crate, and what it reaches.
flowchart LR n_infrastructure_adapters_google_places["infrastructure-adapters-google-places"] -->|uses| SELF n_infrastructure_adapters_google_trends["infrastructure-adapters-google-trends"] -->|uses| SELF n_infrastructure_adapters_yelp["infrastructure-adapters-yelp"] -->|uses| SELF SELF["foundation-source-ingest"] 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 | foundation_source_ingest | `src/lib.rs` |
Error model
| Error type | Named by |
|---|---|
SourceIngestError | Result |
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
3 workspace crates depend on this one: infrastructure-adapters-google-places, infrastructure-adapters-google-trends, infrastructure-adapters-yelp.
Verification
| Kind | Count |
|---|---|
| Unit tests | 3 |
| Integration tests | 0 |
| Examples | 0 |
| Doctests | 0 |
Evidence by module. How often each public module is named by something executable.
| Module | Tests | Examples | Consumers |
|---|---|---|---|
error | 1 | 0 | 2 |
types | 3 | 0 | 9 |
What the tests establish, by name:
test_ingest_result_default—src/types.rstest_ingest_result_merge—src/types.rstest_ingest_result_serialize—src/types.rs
Documentation coverage
| Measure | Documented | Total |
|---|---|---|
| Public items with rustdoc | 5 | 5 |
Public modules with a //! block | 2 | 2 |
pie showData
title Public items with rustdoc
"Documented" : 5
"No rustdoc detected" : 0
Metrics
| Metric | Value |
|---|---|
| Rust source files | 3 |
| Source lines | 167 |
| Code lines | 81 |
| Public API items | 5 |
| Public modules | 2 |
| Tests | 3 |
| Examples | 0 |
| Cargo features | 0 |
| Direct runtime dependencies | 4 |
| Workspace reverse dependencies | 3 |
pie showData
title Public API by kind
"enum" : 1
"method" : 1
"struct" : 1
"trait" : 1
"type alias" : 1
pie showData
title Rust source composition
"Code" : 81
"Blank or comment" : 86
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.