#![doc = include_str!("../README.md")]
#[cfg(all(feature = "sync", feature = "tokio"))]
compile_error!("feature \"sync\" and feature \"tokio\" cannot be enabled at the same time");
#[cfg(all(feature = "sync", feature = "smol"))]
compile_error!("feature \"sync\" and feature \"smol\" cannot be enabled at the same time");
mod error;
mod options;
mod proto;
pub use error::{Error, I2pError, ProtocolError};
pub use options::{DatagramOptions, DestinationKind, SessionOptions, StreamOptions};
#[cfg(any(feature = "tokio", feature = "smol"))]
mod asynchronous;
#[cfg(all(not(feature = "sync"), any(feature = "tokio", feature = "smol")))]
pub use {
asynchronous::router::RouterApi,
asynchronous::session::{style, Session},
asynchronous::stream::{ReadHalf, Stream, WriteHalf},
};
#[cfg(feature = "sync")]
mod synchronous;
#[cfg(all(feature = "sync", not(any(feature = "tokio", feature = "smol"))))]
pub use {
synchronous::router::RouterApi,
synchronous::session::{style, Session},
synchronous::stream::{ReadHalf, Stream, WriteHalf},
};
pub type Result<T> = core::result::Result<T, error::Error>;