inspect-core 0.1.0

Core types and traits for the inspect-rs introspection system
Documentation
//! 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:
//!
//! ```text
//! 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");
//! ```

#![cfg_attr(not(feature = "std"), no_std)]
#![warn(missing_docs, missing_debug_implementations)]

#[cfg(not(feature = "std"))]
extern crate alloc;

mod capability;
mod context;
mod error;
mod field;
mod inspect;
mod kind;
mod limit;
mod path;
mod sensitivity;
mod type_info;
mod value;
mod variant;

mod impls_primitives;
mod impls_std;

pub use capability::Capability;
pub use context::{DepthGuard, InspectCx};
pub use error::{InspectError, InspectResult};
pub use field::FieldInfo;
pub use inspect::Inspect;
pub use kind::Kind;
pub use limit::InspectLimits;
pub use path::{InspectPath, PathSegment};
pub use sensitivity::Sensitivity;
pub use type_info::TypeInfo;
pub use value::{Children, ValueRef};
pub use variant::VariantInfo;