Crate aimdb_core

Crate aimdb_core 

Source
Expand description

AimDB Core Database Engine

§aimdb-core

Type-safe, async in-memory database for data synchronization across MCU → edge → cloud environments.

§Architecture

  • RecordKey/RecordId: Stable identifiers for multi-instance records
  • Unified API: Single Database<A> type for all operations
  • Runtime Agnostic: Works with Tokio (std) or Embassy (embedded)
  • Producer-Consumer: Built-in typed message passing

See examples in the repository for usage patterns.

Re-exports§

pub use context::RuntimeContext;
pub use database::Database;
pub use builder::AimDb;
pub use builder::AimDbBuilder;
pub use connector::ConnectorBuilder;
pub use transport::Connector;
pub use transport::ConnectorConfig;
pub use transport::PublishError;
pub use typed_api::Consumer;
pub use typed_api::Producer;
pub use typed_api::RecordRegistrar;
pub use typed_api::RecordT;
pub use typed_record::AnyRecord;
pub use typed_record::AnyRecordExt;
pub use typed_record::TypedRecord;
pub use connector::ConnectorClient;
pub use connector::ConnectorUrl;
pub use connector::SerializeError;
pub use router::Route;
pub use router::Router;
pub use router::RouterBuilder;
pub use record_id::RecordId;
pub use record_id::RecordKey;
pub use record_id::StringKey;

Modules§

buffer
Runtime-agnostic buffer traits and configuration for async producer-consumer dispatch
builder
Database builder with type-safe record registration
connector
Connector infrastructure for external protocol integration
context
Runtime context for AimDB services
database
Core database implementation
ext_macros
Extension trait macros for runtime adapters
record_id
Record identification types for stable, O(1) lookups
remote
Remote access subsystem for AimDB (AimX protocol)
router
Generic message router for efficient connector dispatch
time
Time and timing utilities for AimDB
transport
Transport connector traits for MQTT, Kafka, HTTP, shmem, and other protocols
typed_api
Type-safe Producer-Consumer API
typed_record
Type-safe record storage using TypeId

Macros§

impl_record_registrar_ext
Generate an extension trait for convenient record configuration

Structs§

RuntimeInfo

Enums§

DbError
Streamlined error type for AimDB operations
ExecutorError

Traits§

Logger
Logging trait - enables ctx.log() accessor
Runtime
Complete runtime trait bundle
RuntimeAdapter
Core runtime adapter trait - provides identity
Spawn
Task spawning trait - adapter-specific implementation
TimeOps
Time operations trait - enables ctx.time() accessor

Type Aliases§

DbResult
Type alias for Results using DbError
ExecutorResult

Derive Macros§

RecordKey
Derive the RecordKey trait for an enum