#![cfg_attr(not(feature = "std"), no_std)]
extern crate alloc;
#[cfg(feature = "core")]
pub mod optics;
#[cfg(feature = "collections")]
pub use zwire_collections as collections;
#[cfg(feature = "core")]
pub use zwire_core as core;
#[cfg(feature = "protocol")]
pub use zwire_protocol as protocol;
#[cfg(feature = "tx")]
pub use zwire_tx as tx;
#[cfg(all(feature = "core", feature = "collections"))]
mod reactive_collection;
#[cfg(all(feature = "core", feature = "collections"))]
pub use reactive_collection::ReactiveCollection;
#[cfg(all(feature = "sync", feature = "collections"))]
mod sync_reactive_collection;
#[cfg(all(feature = "sync", feature = "collections"))]
pub use sync_reactive_collection::SyncReactiveCollection;
#[cfg(all(feature = "tx", feature = "collections"))]
mod transactional_collection;
#[cfg(all(feature = "tx", feature = "collections"))]
pub use transactional_collection::{RowEdit, TransactionalCollection};
pub mod prelude {
#[cfg(all(feature = "core", feature = "collections"))]
pub use crate::ReactiveCollection;
#[cfg(all(feature = "sync", feature = "collections"))]
pub use crate::SyncReactiveCollection;
#[cfg(all(feature = "tx", feature = "collections"))]
pub use crate::TransactionalCollection;
#[cfg(feature = "collections")]
pub use crate::collections::{AcceptAll, Collection, TopKViewId};
#[cfg(feature = "core")]
pub use crate::core::{
Atom, AtomOptions, Computed, ComputedOptions, CoreError, EvalContext, HookGuard, NodeId,
Owner, Scope, ScopeMode, Signal, Subscription, WeakScope,
};
#[cfg(feature = "sync")]
pub use crate::core::{
SyncAtom, SyncAtomOptions, SyncCleanupFn, SyncComputed, SyncComputedOptions,
SyncEvalContext, SyncHookGuard, SyncOwner, SyncScope, SyncSignal, SyncSubscription,
WeakSyncScope,
};
#[cfg(feature = "core")]
pub use crate::optics::Lens;
#[cfg(feature = "protocol")]
pub use crate::protocol::{
ExternalSource, HydratedState, InspectorHook, PatchOrigin, StatePatch, SyncAdapter,
SyncBridge, SyncBridgeOptions, WireCodec, WireValue, attach_inspector, create_sync_bridge,
dehydrate, dehydrate_json, from_external_source, hydratable, hydrate, hydrate_json,
};
#[cfg(all(feature = "protocol", feature = "sync"))]
pub use crate::protocol::{
SyncExternalSource, SyncInspectorGuard, SyncInspectorHook, ThreadSyncAdapter,
ThreadSyncBridge, attach_sync_inspector, create_thread_sync_bridge,
from_sync_external_source, register_sync_hydratable, sync_dehydrate, sync_dehydrate_json,
sync_hydratable, sync_hydrate, sync_hydrate_json,
};
#[cfg(feature = "tx")]
pub use crate::tx::{
Draft, DraftBase, DraftError, OptimisticGuard, OptimisticLayer, run_optimistic,
};
#[cfg(all(feature = "sync", feature = "tx"))]
pub use crate::tx::{
SyncDraft, SyncOptimisticGuard, SyncOptimisticLayer, SyncSettlement, run_sync_optimistic,
};
}
#[cfg(all(
doctest,
feature = "std",
feature = "core",
feature = "tx",
feature = "collections",
feature = "protocol"
))]
#[doc = include_str!("../README.md")]
mod readme_doctests {}