Export the BoxedZebraService type alias.

This gives API consumers a convenient name, and makes the Rustdoc output
significantly cleaner (because `init` can return a `BoxedZebraService`, not a
`Box<dyn ...ManyTypeConstraints.......>`.
This commit is contained in:
Henry de Valence 2019-10-17 10:38:25 -07:00
parent 1c6c4140ed
commit c7e0d63bed
2 changed files with 3 additions and 2 deletions

View File

@ -56,7 +56,7 @@ mod timestamp_collector;
pub use config::Config; pub use config::Config;
pub use meta_addr::MetaAddr; pub use meta_addr::MetaAddr;
pub use network::Network; pub use network::Network;
pub use peer_set::init; pub use peer_set::{init, BoxedZebraService};
pub use protocol::internal::{Request, Response}; pub use protocol::internal::{Request, Response};
pub use timestamp_collector::TimestampCollector; pub use timestamp_collector::TimestampCollector;

View File

@ -36,7 +36,8 @@ use crate::{
BoxedStdError, BoxedStdError,
}; };
type BoxedZebraService = Box< /// A type alias for a boxed [`tower::Service`] used to process [`Request`]s into [`Response`]s.
pub type BoxedZebraService = Box<
dyn Service< dyn Service<
Request, Request,
Response = Response, Response = Response,