Thin bounded wrapper around mtr --report --json: cited Observations from a network path trace, no verdicts
| Tier | operations |
| Role | unclassified (baselined) |
| Path | crates/operations/net-trace |
| Edition | 2021 |
| Targets | operations_net_trace |
| Public items | 3 across 0 modules |
| Tests | 3 |
What it is for
Thin bounded wrapper around mtr --report --json: cited Observations from a network path trace, no verdicts.
Wire format verified live against real mtr output on this machine (not assumed): mtr --report --json --report-cycles 1 <target> produces {"report": {"mtr": {...}, "hubs": {"count", "host", "Loss%", "Snt", "Last", "Avg", "Best", "Wrst", "StDev"}, ...}} — a clean, typed structure (unlike Volatility3's tree-shaped renderer), so this crate deserializes into real structs rather than citing generic key=value pairs.
Capabilities
NetTraceError
Thin bounded wrapper around mtr --report --json: cited Observations from a
| Item |
|---|
pub enum NetTraceError |
fn parse_mtr_json(stdout : & str, rule_id : & str) -> Result <Vec <Observation>, NetTraceError> |
async fn trace(mtr_bin : impl Into <PathBuf>, target : & str, limits : ExecLimits,) -> Result <Vec <Observation>, NetTraceError> |
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 NetTraceError | Every way a trace can fail. |
fn parse_mtr_json(stdout : & str, rule_id : & str) -> Result <Vec <Observation>, NetTraceError> | Parse mtr --report --json stdout into cited Observations, one per hop |
async fn trace(mtr_bin : impl Into <PathBuf>, target : & str, limits : ExecLimits,) -> Result <Vec <Observation>, NetTraceError> | Run mtr --report --json --report-cycles 1 <target> and cite each hop |
No pub use re-exports: every item above is declared in this crate.
Boundary
Reaches into foundation, infrastructure.
Shares tier operations with 40 other crates: operations-approval-workflow, operations-assessments, operations-block-imaging, operations-boot-media, operations-browser-agent-worker, operations-camera-discovery, operations-camera-liveview, operations-camera-registry, … (40 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) | operations |
| Architectural role (taxonomy) | unclassified (baselined) |
| Location | crates/operations/net-trace |
| Vocabulary in force (lexicon) | current |
Tier flow. Which tiers this crate's own edges cross.
flowchart LR n_operations["operations"] --> n_foundation["foundation"] n_operations["operations"] --> n_infrastructure["infrastructure"]
Dependencies
Runtime, in this workspace.
| Crate | Tier | Optional | Only on |
|---|---|---|---|
| `foundation-bounded-io` | foundation | no | always |
| `infrastructure-host-forensics` | infrastructure | no | always |
Runtime, from outside the workspace.
| Crate | Requirement | Features | Optional | Only on |
|---|---|---|---|---|
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 |
Build. None.
Depended on by. Nothing in this workspace.
Signal flow — what reaches this crate, and what it reaches.
flowchart LR SELF["operations-net-trace"] SELF -->|runtime| n_foundation_bounded_io["foundation-bounded-io"] SELF -->|runtime| n_infrastructure_host_forensics["infrastructure-host-forensics"] 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 | operations_net_trace | `src/lib.rs` |
Error model
| Error type | Named by |
|---|---|
NetTraceError | parse_mtr_json, trace |
Operational characteristics
| Property | Evidence |
|---|---|
| async public surface | yes |
| async runtime | none detected |
| database access | none detected |
| network I/O | none detected |
| unsafe code | none detected |
| environment variables | yes |
No unsafe block, unsafe fn, unsafe impl or unsafe trait was found by the parser anywhere in this crate's source.
Configuration
| Variable | Read in |
|---|---|
CARGO_MANIFEST_DIR | src/lib.rs |
Related capabilities
No workspace crate depends on this one.
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 |
|---|---|---|---|
crate root | 3 | 0 | 0 |
What the tests establish, by name:
parse_mtr_json_cites_one_observation_per_hop—src/lib.rsparse_mtr_json_rejects_unrecognized_shape—src/lib.rstrace_wires_stdout_through_the_parser—src/lib.rs
Documentation coverage
| Measure | Documented | Total |
|---|---|---|
| Public items with rustdoc | 3 | 3 |
Public modules with a //! block | 0 | 0 |
pie showData
title Public items with rustdoc
"Documented" : 3
"No rustdoc detected" : 0
Metrics
| Metric | Value |
|---|---|
| Rust source files | 1 |
| Source lines | 156 |
| Code lines | 115 |
| Public API items | 3 |
| Public modules | 0 |
| Tests | 3 |
| Examples | 0 |
| Cargo features | 0 |
| Direct runtime dependencies | 5 |
| Workspace reverse dependencies | 0 |
pie showData
title Public API by kind
"enum" : 1
"function" : 2
pie showData
title Rust source composition
"Code" : 115
"Blank or comment" : 41
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.