dittolive_ditto/
prelude.rs

1//! Add `use dittolive_ditto::prelude::*;` to import frequently-used Ditto functionality.
2//!
3//! The prelude contains all common imports when using this crate.
4
5pub use serde_cbor::Value as CborValue;
6
7#[allow(deprecated)]
8pub use crate::small_peer_info::DittoSmallPeerInfoSyncScope;
9#[doc(hidden)]
10#[allow(deprecated)]
11#[cfg(feature = "timeseries")]
12pub use crate::store::timeseries::TimeSeries;
13#[allow(deprecated)]
14pub use crate::{
15    disk_usage::DiskUsage,
16    ditto::init::{DittoAuthExpirationHandler, DittoConfig, DittoConfigConnect},
17    error::DittoError,
18    ffi_sdk::{BoxedDitto, BoxedDocument, CLogLevel, StringPrimitiveFormat},
19    fs::{DittoRoot, PersistentRoot, TempRoot},
20    identity::{
21        self, DittoAuthenticationEventHandler, DittoAuthenticator, Identity, Manual,
22        OfflinePlayground, OnlinePlayground, OnlineWithAuthentication, SharedKey,
23    },
24    logger::DittoLogger,
25    presence::{
26        ConnectionRequest, ConnectionRequestAuthorization, Presence, PresenceGraph,
27        PresenceObserver,
28    },
29    store::{
30        attachment::{
31            DittoAttachment, DittoAttachmentFetchEvent, DittoAttachmentFetcher,
32            DittoAttachmentToken,
33        },
34        dql::query_v2::IntoQuery,
35        transactions::{
36            CreateTransactionOptions, Transaction, TransactionCompletionAction, TransactionInfo,
37        },
38        Store, WriteStrategy,
39    },
40    transport::{HttpListenConfig, TcpListenConfig, TransportConfig},
41    utils::extension_traits::CborValueGetters,
42    AppId, Ditto, LogLevel,
43};
44// NOTE(nimo): Doctest to ensure items are hidden/deprecated but available
45// TODO(v5): remove
46/// ```rust,no_run
47/// use dittolive_ditto::prelude::{DittoBuilder, Observer, PeersObserver, SiteId};
48/// ```
49#[doc(hidden)]
50#[allow(deprecated)]
51pub use crate::{
52    ditto::SiteId,
53    observer::Observer,
54    presence::observer_legacy::PeersObserver,
55    store::query_builder::{
56        COrderByParam, Collection, CollectionsEvent, CollectionsEventHandler, DittoCounter,
57        DittoDocument, DittoMutDocument, DittoMutableCounter, DittoMutableRegister, DittoRegister,
58        DocumentId, EventHandler, LiveQuery, LiveQueryEvent, LiveQueryMove,
59        PendingCollectionsOperation, PendingCursorOperation, PendingIdSpecificOperation,
60        QuerySortDirection, SingleDocumentEventHandler, SingleDocumentLiveQueryEvent, Subscription,
61    },
62    DittoBuilder,
63};