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