diff --git a/src/lib.rs b/src/lib.rs index af51028..c48cc50 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -12,7 +12,7 @@ //! `ssip-client` implements a Speech Dispatcher SSIP client library in //! pure rust. //! -//! See [`Client`] API for details. +//! See [`client::Client`] for the synchronous API and [`async_mio::AsyncClient`] for the asynchronous API based on [mio](https://crates.io/crates/mio). //! //! Example //! ```no_run @@ -29,13 +29,13 @@ #[macro_use] mod protocol; -mod client; mod types; +pub mod client; pub mod constants; pub mod fifo; -#[cfg(not(feature = "async-mio"))] +#[cfg(any(not(feature = "async-mio"), doc))] pub use client::Client; pub use client::{ClientError, ClientName, ClientResult, ClientStatus}; @@ -43,7 +43,7 @@ pub use constants::*; pub use types::StatusLine; pub use types::*; -#[cfg(feature = "async-mio")] +#[cfg(any(feature = "async-mio", doc))] mod async_mio; #[cfg(feature = "async-mio")] diff --git a/src/types.rs b/src/types.rs index b356c5f..05509b1 100644 --- a/src/types.rs +++ b/src/types.rs @@ -379,7 +379,8 @@ impl fmt::Display for StatusLine { } #[cfg(not(feature = "async-mio"))] -pub use std::fmt::Debug as Source; // Trick to have common implementation for sync and async. +// Trick to have common implementation for std and mio streams.. +pub use std::fmt::Debug as Source; #[cfg(feature = "async-mio")] pub use mio::event::Source;