//! This crate defines the types that Ditto uses as part of its FFI.
//!
//! Instead of importing this crate directly, [see Ditto's Rust SDK at
//! `dittolive_ditto`][0].
//!
//! [0]: https://docs.rs/dittolive_ditto

#![warn(rust_2018_idioms)]
#![warn(clippy::correctness)]
#![cfg_attr(not(test), warn(clippy::perf))]
#![cfg_attr(
    doc,
    warn(
        rustdoc::bare_urls,
        rustdoc::broken_intra_doc_links,
        rustdoc::invalid_codeblock_attributes,
        rustdoc::invalid_rust_codeblocks,
    )
)]

#[cfg(feature = "preview-pk")]
/// See [`PeerPubkey`](crate::peer_pubkey::PeerPubkey)
pub mod peer_pubkey;

#[cfg(feature = "preview-datastreams")]
/// The low-level FFI for the the [`datastreams`].
///
/// This FFI is not intended to be used directly, but instead through the API provided by the
/// [`datastreams`] module.
///
/// While it can be used in conjunction with [`datastreams`], doing so may yield unintuitive
/// patterns, leading to subtle bugs if you're not exceedingly careful.
pub mod datastreams_ffi;

#[cfg(feature = "preview-datastreams")]
/// The Ditto Datastreams API: leverage Ditto's virtual network for your own applications.
pub mod datastreams;
