iroh_db/
lib.rs

1//! Rust-native, local-first distributed database built on iroh.
2//!
3//! Local-first typed storage plus authenticated iroh synchronization.
4
5#![forbid(unsafe_code)]
6
7mod db;
8mod network;
9mod operations;
10mod snapshot;
11mod telemetry;
12
13pub use db::{
14    Blobs, Change, ChangeBatch, ChangeKind, Collection, Cursor, DbError, DeviceGroup, IrohDb,
15    IrohDbBuilder, MigrationError, MigrationReport, OrderDirection, Page, Predicate,
16    ProjectionReport, Query, RemoteApply, Subscription, SubscriptionError, SubscriptionEvent,
17    Transaction,
18};
19pub use iroh_db_blobs::{
20    BlobError, BlobPriority, BlobRef, BlobStream, FetchMetrics, FetchOptions, FetchScheduler,
21    ProviderMetrics,
22};
23pub use iroh_db_core::{
24    AuthorId, BlobHash, CapabilityId, CollectionId, CommitBody, CommitEnvelope, CommitHeader,
25    CommitId, CrdtError, CrdtKind, DomainId, Dot, EqualityFilter, FieldDescriptor, FieldState,
26    GrowOnlySet, Immutable, IrohRecord, Lww, Merge, MigrationId, MultiValue, Operation,
27    OperationKind, OrSet, OrderedList, PnCounter, RangeFilter, RangeOperator, RecordError,
28    RecordKey, SchemaActivation, SchemaDescriptor, SchemaId, SchemaStage, SnapshotId,
29    TransactionId, TypedField, VersionVector, staging_digest,
30};
31pub use iroh_db_derive::IrohRecord;
32pub use iroh_db_security::{
33    CapabilityCertificate, ConsistencyMode, ControlTransition, DomainDescriptor, DomainSeed,
34    Invitation, InvitationSecret, InvitationTicket, IrohSigner, KeyProvider, Permission,
35    PermissionSet,
36};
37pub use network::{GossipSession, SYNC_ALPN, SyncNode, SyncReport};
38pub use operations::{
39    BackupOptions, BackupReport, OperationalMetrics, VerificationReport, backup_closed,
40    backup_closed_with_signer, restore_backup, restore_backup_from,
41};
42pub use snapshot::Snapshot;
43pub use telemetry::LatencyMetrics;
44
45/// Implementation details referenced by generated code; not a stable API.
46#[doc(hidden)]
47pub mod __private {
48    pub use iroh_db_core as core;
49}