Expand description
User-facing Rust facade crate for yugendb.
yugendb is the crate Rust applications normally depend on. It re-exports
yugendb_core and exposes optional driver modules behind feature flags.
yugendb stores serialised typed values by namespace, collection, and key:
namespace + collection + key -> serialised typed valueSQL drivers use tables, MongoDB uses documents, and Redis uses derived keys behind the driver. Those backend details do not change the public yugendb API.
Project-owned terminology uses en-GB spelling, including initialise,
finalise, serialise, deserialise, and behaviour.
§Driver features
- JSON serialisation is built in through
JsonCodec. memory: in-process memory driver.sqlite: SQLite driver.mysql: MySQL driver.mongodb: MongoDB driver.postgres: PostgreSQL driver.redis: Redis driver.all-drivers: enables all bundled driver features.
External-service drivers require their matching database service at runtime.
Modules§
- batch
- Batch operation types.
- capabilities
- Driver capability reporting.
- codec
- Codec model for serialising and deserialising typed values.
- collection
- Typed collection handle.
- driver
- Driver trait for concrete storage backends.
- drivers
- Feature-gated driver exports.
- error
- Structured error model for yugendb.
- key
- Namespace, collection name, and key validation.
- options
- Operation option types.
- prelude
- Common imports for application code.
- store
- User-facing store and builder types.
- transaction
- Transaction trait for drivers that support transaction-like behaviour.
- value
- Stored byte value and metadata types.
Structs§
- Batch
- Ordered batch of write operations.
- Batch
Result - Summary returned after a batch write.
- Capabilities
- Feature report exposed by each driver.
- Collection
- Typed handle for records in a collection.
- Collection
Name - Logical collection name inside a namespace.
- Delete
Options - Options for delete operations.
- Json
Codec - JSON codec using
serde_json. - Key
- Stable key inside a namespace and collection.
- Namespace
- Logical storage partition above collections.
- Read
Options - Options for read operations.
- Scan
Options - Options for prefix scans.
- Store
- Main user-facing database handle.
- Store
Builder - Builder for
Store. - Stored
Value - A serialised value and its metadata.
- Value
Bytes - Opaque serialised value bytes.
- Value
Metadata - Metadata stored alongside a serialised value.
- Write
Options - Options for write operations.
Enums§
- Batch
Operation - A single batch operation.
- Error
Code - Stable cross-language error codes.
- Yugen
DbError - Main structured error type for yugendb.
Traits§
- Codec
- Object-safe codec contract used by stores.
- Codec
Ext - Typed codec helpers.
- Driver
- Async storage driver contract.
- Transaction
- Basic async transaction contract.
Type Aliases§
- Result
- Result alias used throughout yugendb.