Skip to main content

Crate carbon_core

Crate carbon_core 

Source
Expand description

Core building blocks for streaming-based Solana data indexing with Carbon.

§Components

  • pipeline — orchestrates data flow from datasources to processors.
  • datasource — ingestion layer defining Datasource and Update types.
  • processor — user-defined handlers via Processor<T> trait.
  • account, instruction, transaction, account_deletion, block_details — pipeline stages and update-specific models.
  • filter — routing layer applied to all pipes (scoping, deduplication, slot constraints).
  • metrics — atomic observability primitives and global registry.
  • collection — multi-decoder routing for transaction instruction sets.
  • deserialize — shared Borsh utilities for decoder crates.

§Optional features

  • postgres — SQL-backed processors using sqlx.
  • graphql — GraphQL schema + Axum integration.

Re-exports§

pub use borsh;

Modules§

account
Account-shaped pipe wiring + per-account metadata and decoder traits.
account_deletion
Account-deletion pipe wiring.
account_utils
Positional AccountMeta iteration helpers used by generated decoders.
block_details
Block-details pipe wiring.
collection
Multi-decoder routing primitive for transaction-level instruction dispatch.
datasource
Ingestion layer of the pipeline: defines upstream data sources and the normalized update types they emit.
deserialize
Borsh helpers shared by Codama-generated decoder crates.
error
Crate-wide error type and Result alias used across the pipeline.
filter
Per-pipe filtering layer applied to updates before processing.
instruction
Instruction decoding, CPI nesting, and instruction-shaped pipe wiring.
metrics
Lock-free metrics primitives + global registry + exporter trait.
pipeline
Pipeline orchestrator — central runtime that wires datasources, pipes, filters, and metrics into a single run() loop.
processor
Processor trait — user-defined handler executed for each decoded update.
transaction
Transaction-shaped pipe wiring + per-transaction metadata.
transformers
Internal helpers that turn datasource payloads into pipeline-ready shapes.
try_decode_ixs

Macros§

instruction_decoder_collection
Generate a sum-type instruction enum over multiple program decoders along with its InstructionDecoderCollection impl.
try_decode_instructions
Try-decode a Solana Instruction against a series of variant/type pairs, returning the first variant whose decode and arrange_accounts both succeed.

Derive Macros§

InstructionType
Derive a sibling *Type enum (variant tags only) and a get_instruction_type(&self) -> *Type accessor on the annotated enum.