infrastructure capa

infrastructure-timeline

Generic multi-source chronological timeline: a precision-preserving TimelineEntry DTO, a TimelineSource trait, a cursor-paginated aggregator that k-way merges N sources (with an Undated bucket), and a StubTimelineSource for tests. No rendering, no domain logic — the consumer owns tables and presentation.

Generic multi-source chronological timeline: a precision-preserving TimelineEntry DTO, a TimelineSource trait, a cursor-paginated aggregator that k-way merges N sources (with an Undated bucket), and a StubTimelineSource for tests. No rendering, no domain logic — the consumer owns tables and presentation.

Tierinfrastructure
Roleunclassified (baselined)
Pathcrates/infrastructure/timeline
Edition2021
Targetsinfrastructure_timeline
Public items0 across 0 modules
Tests11

What it is for

infrastructure-timeline — a generic, multi-source chronological timeline aggregator.

The surface is deliberately small and dependency-light (mirrors infrastructure-embeddings): a precision-preserving TimelineEntry DTO, a TimelineSource trait a consumer implements once per feed, a TimelineAggregator that k-way merges N sources into one cursor-paginated stream, and a StubTimelineSource so the whole flow builds and unit-tests with zero backing store.

Scope boundary (upstream half). This crate does NO rendering and holds NO domain knowledge — no party colors, no legal/deadline semantics, no tables. It aggregates the consumer's existing tables via the source trait; the consumer owns storage, presentation, and any color/party logic. It is the reusable upstream half of case-forge Sprint 09 (the legal timeline render stays in the consumer).

Two invariants that make it trustworthy for evidentiary use:

TimePrecision::Year and is not passed off as a real 2019-01-01T00:00:00Z; among entries at the same instant, precision_rank is the deterministic tiebreaker (coarse before fine).

never silently masquerades as "no more entries".

use std::sync::Arc;
use infrastructure_timeline::{
StubTimelineSource, TimelineAggregator, TimelineEntry, TimePrecision,
};
use uuid::Uuid;

# async fn demo() -> Result<(), infrastructure_timeline::TimelineError> {
let now = "2020-01-01T00:00:00Z".parse().ok();
let source = StubTimelineSource::new(
"communication",
vecTimelineEntry::new(
"communication", Uuid::from_u128(1), now,
TimePrecision::Second, "call", None, serde_json::Value::Null,
),
);
let agg = TimelineAggregator::new().with_source(Arc::new(source));
let page = agg.page(None, 50).await?;
assert_eq!(page.entries.len(), 1);
# Ok(()) }

Capabilities

No public items.

How to use it

From this crate's own rustdoc:

use std::sync::Arc;
use infrastructure_timeline::{
    StubTimelineSource, TimelineAggregator, TimelineEntry, TimePrecision,
};
use uuid::Uuid;

# async fn demo() -> Result<(), infrastructure_timeline::TimelineError> {
let now = "2020-01-01T00:00:00Z".parse().ok();
let source = StubTimelineSource::new(
    "communication",
    vec![TimelineEntry::new(
        "communication", Uuid::from_u128(1), now,
        TimePrecision::Second, "call", None, serde_json::Value::Null,
    )],
);
let agg = TimelineAggregator::new().with_source(Arc::new(source));
let page = agg.page(None, 50).await?;
assert_eq!(page.entries.len(), 1);
# Ok(()) }

Module structure

No public modules: the crate root is its whole surface.

Public surface

No public items.

Re-exports. Exported here, defined elsewhere.

ExportDefined in
Cursorcursor::Cursor
TimelineErrorerror::TimelineError
{StubTimelineSource,TimelineSource}source::{StubTimelineSource,TimelineSource}
{TimePrecision,TimelineBucket,TimelineEntry}entry::{TimePrecision,TimelineBucket,TimelineEntry}
{TimelineAggregator,TimelinePage}aggregator::{TimelineAggregator,TimelinePage}

Boundary

Depends on no other workspace tier.

Shares tier infrastructure with 82 other crates: infrastructure-acquire, infrastructure-adapters-google-calendar, infrastructure-adapters-google-gmail, infrastructure-adapters-google-places, infrastructure-adapters-google-trends, infrastructure-adapters-shodan, infrastructure-adapters-yelp, infrastructure-agent, … (82 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)infrastructure
Architectural role (taxonomy)unclassified (baselined)
Locationcrates/infrastructure/timeline
Vocabulary in force (lexicon)current

Dependencies

Runtime, from outside the workspace.

CrateRequirementFeaturesOptionalOnly on
async-trait^0.1noalways
chrono^0.4serdenoalways
serde^1derive, derivenoalways
serde_json^1noalways
thiserror^2noalways
uuid^1v4, v7, serde, jsnoalways

Development, from outside the workspace.

CrateRequirementFeaturesOptionalOnly on
tokio^1full, macros, rt-multi-threadnoalways

Build. None.

Depended on by. Nothing in this workspace.

Feature flags

No Cargo features are defined: every capability is unconditional, so no consumer can receive a half-wired crate.

Targets

KindNameSource
libinfrastructure_timeline`src/lib.rs`

Error model

No public error type was detected: no public item declares a type named *Error, and no public signature returns one.

Operational characteristics

PropertyEvidence
async public surfacenone detected
async runtimenone detected
database accessnone detected
network I/Onone detected
unsafe codenone detected
environment variablesnone 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.

No workspace crate depends on this one.

Verification

KindCount
Unit tests11
Integration tests0
Examples0
Doctests1

What the tests establish, by name:

Documentation coverage

MeasureDocumentedTotal
Public items with rustdoc00
Public modules with a //! block00

Metrics

MetricValue
Rust source files6
Source lines806
Code lines538
Public API items0
Public modules0
Tests11
Examples0
Cargo features0
Direct runtime dependencies6
Workspace reverse dependencies0
pie showData
    title Rust source composition
    "Code" : 538
    "Blank or comment" : 268

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 infrastructure · Manual