Skip to main content

Crate indicio

Crate indicio 

Source
Expand description

§indicio

Indicio provides a framework for emitting clues that may be used for debugging.

§Status

Active development. Indicio is likely to change in the near future in backwards-incompatible ways.

§Scope

Indicio provides:

  • A Value tree for structured clue payloads.
  • The value! and clue! macros for lazy clue construction.
  • Collector for registering an emitter and filtering by verbosity.
  • StdioEmitter for human-readable stderr output.
  • ProtobufEmitter for append-only clue files when the prototk feature is enabled.

The protobuf file format is a sequence of field-1 clue messages. It remains readable as a ClueVector so existing consumers can continue to decode files written by ProtobufEmitter.

§Warts

  • Map preserves insertion order and duplicate keys. Lookup returns the first matching key.
  • Value equality gives f64 values a total ordering semantics, so values such as -0.0 and 0.0 compare differently.
  • puzzle_piece! is intentionally small. Use try_extract when callers need a missing-path or type-mismatch diagnostic; extract remains available for the older Option-returning API.

§Documentation

The latest documentation is always available at docs.rs.

Re-exports§

pub use stdio::StdioEmitter;
pub use protobuf::ClueFrame;
pub use protobuf::ClueVector;
pub use protobuf::ProtobufEmitter;

Modules§

protobuf
stdio

Macros§

clue
Emit the specified value if and only if the collector is logging.
puzzle_piece
Match a “shape” of a clue and flatten it.
value
Construct a value literal using something that looks like rust literals.

Structs§

Clue
Collector
A collector is meant to be a static singleton that conditionally logs.
ExtractionError
LevelFilter
An emitter that filters log messages above a log level.
Map
MapEntry
Values

Enums§

ExtractionErrorKind
Value
ValueKind

Constants§

ALWAYS
DEBUG
ERROR
INFO
TRACING
WARNING

Traits§

Emitter
An emitter for indicio that emits values.

Functions§

register_biometrics
Registers this crate’s biometrics with the provided Collector.
register_monitors
Registers this crate’s monitors with the provided HeyListen.