proxmox-api/src/lib.rs: hide modules with inlined docs

This commit is contained in:
Dietmar Maurer 2019-11-23 09:53:18 +01:00
parent edb41c1929
commit fa83cbde13
3 changed files with 11 additions and 0 deletions

View File

@ -1,3 +1,9 @@
//! Allow to build Regex within `const_fn`
//!
//! The current Regex::new() function is not `const_fn`. Unless that
//! works, we use a macro to generate something we can use inside
//! `const_fn`.
/// Macro to generate a ConstRegexPattern
#[macro_export]
macro_rules! const_regex {

View File

@ -5,6 +5,7 @@ use failure::Fail;
#[doc(hidden)]
pub use hyper::StatusCode;
/// HTTP error including `StatusCode` and message.
#[derive(Debug, Fail)]
pub struct HttpError {
pub code: StatusCode,
@ -23,6 +24,7 @@ impl fmt::Display for HttpError {
}
}
/// Macro to create a HttpError inside a failure::Error
#[macro_export]
macro_rules! http_err {
($status:ident, $msg:expr) => {{

View File

@ -10,9 +10,12 @@ use hyper::{Body, Response};
use serde_json::Value;
pub mod const_regex;
#[doc(hidden)]
pub mod error;
pub mod format;
#[doc(hidden)]
pub mod router;
#[doc(hidden)]
pub mod rpc_environment;
pub mod schema;