Skip to main content

Crate inspect_core

Crate inspect_core 

Source
Expand description

Core types and traits for the inspect-rs introspection system.

This crate provides the fundamental Inspect trait and associated types for building structured introspection of Rust values without coupling to debuggers, serializers, or specific UI frameworks.

§Overview

The core model is:

Rust value
    ↓
Inspect::inspect()
    ↓
ValueRef (borrowed structured representation)
    ↓
renderers / tooling / analysis

§Design principles

  • Lazy: Values are not eagerly traversed
  • Zero-copy: Borrows from original values where possible
  • Safe: Handles cycles, respects limits, protects secrets
  • Minimal: Zero runtime dependencies

§Example

use inspect_core::{Inspect, InspectCx};

let value = 42u32;
let mut cx = InspectCx::new();
let inspected = value.inspect(&mut cx);

assert_eq!(inspected.kind().name(), "u32");

Structs§

Capability
Capabilities that an inspectable value supports.
DepthGuard
RAII guard for depth tracking.
FieldInfo
Metadata about a struct field or tuple element.
InspectCx
Context for an inspection session.
InspectLimits
Limits to prevent pathological inspection behavior.
InspectPath
A path through an inspected value tree.
TypeInfo
Metadata about a type being inspected.
ValueRef
A borrowed reference to an inspected value.
VariantInfo
Metadata about an enum variant.

Enums§

Children
Children of an inspected value.
InspectError
Errors that can occur during inspection.
Kind
The kind of value being inspected.
PathSegment
A segment in an inspection path.
Sensitivity
Classification of data sensitivity for security-conscious rendering.

Traits§

Inspect
Provides structured introspection of a Rust value.

Type Aliases§

InspectResult
Result type for inspection operations.