diff --git a/src/lib.rs b/src/lib.rs index 8a83b62f..6c48135b 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -81,10 +81,12 @@ pub use crate::proto::Reconnect; pub use crate::proto::{Job, JobBuilder}; #[cfg(feature = "ent")] -pub use crate::proto::{Batch, BatchBuilder, BatchStatus}; +#[cfg_attr(docsrs, doc(cfg(feature = "ent")))] +pub use crate::proto::{ + Batch, BatchBuilder, BatchStatus, Progress, ProgressUpdate, ProgressUpdateBuilder, +}; #[cfg(feature = "ent")] mod tracker; #[cfg(feature = "ent")] -pub use crate::proto::{Progress, ProgressUpdate, ProgressUpdateBuilder}; -#[cfg(feature = "ent")] +#[cfg_attr(docsrs, doc(cfg(feature = "ent")))] pub use crate::tracker::Tracker; diff --git a/src/proto/mod.rs b/src/proto/mod.rs index 28d0c16b..9dc9e988 100644 --- a/src/proto/mod.rs +++ b/src/proto/mod.rs @@ -15,10 +15,11 @@ pub use self::single::{ gen_random_wid, Ack, Fail, Heartbeat, Info, Job, JobBuilder, Push, QueueAction, QueueControl, }; -#[cfg(feature = "ent")] -mod batch; #[cfg(feature = "ent")] pub use self::single::ent::{Progress, ProgressUpdate, ProgressUpdateBuilder, Track}; + +#[cfg(feature = "ent")] +mod batch; #[cfg(feature = "ent")] pub use batch::{ Batch, BatchBuilder, BatchHandle, BatchStatus, CommitBatch, GetBatchStatus, OpenBatch, diff --git a/src/proto/single/mod.rs b/src/proto/single/mod.rs index 2e3fdcf0..811be23b 100644 --- a/src/proto/single/mod.rs +++ b/src/proto/single/mod.rs @@ -9,13 +9,13 @@ mod utils; #[cfg(feature = "ent")] #[cfg_attr(docsrs, doc(cfg(feature = "ent")))] -mod ent; +pub mod ent; use crate::error::Error; pub use self::cmd::*; pub use self::resp::*; -pub use self::utils::{gen_random_jid, gen_random_wid}; +pub use self::utils::gen_random_wid; const JOB_DEFAULT_QUEUE: &str = "default"; const JOB_DEFAULT_RESERVED_FOR_SECS: usize = 600;