proxmox-api/src/format.rs: improve docs

This commit is contained in:
Dietmar Maurer 2019-12-02 20:06:14 +01:00
parent 00f3a6575c
commit 4bca463944

View File

@ -7,24 +7,28 @@ use super::router::{Router, SubRoute};
use super::schema::*; use super::schema::*;
use super::{ApiHandler, ApiMethod}; use super::{ApiHandler, ApiMethod};
/// Enumerate different styles to display parameters/properties.
#[derive(Copy, Clone)] #[derive(Copy, Clone)]
pub enum ParameterDisplayStyle { pub enum ParameterDisplayStyle {
/// Used for properties in configuration files: ``key:``
Config, Config,
//SonfigSub, //SonfigSub,
/// Used for command line options: ``--key``
Arg, Arg,
/// Used for command line options passed as arguments: ``<key>``
Fixed, Fixed,
} }
/// CLI usage information format /// CLI usage information format.
#[derive(Copy, Clone, PartialEq)] #[derive(Copy, Clone, PartialEq)]
pub enum DocumentationFormat { pub enum DocumentationFormat {
/// text, command line only (one line) /// Text, command line only (one line).
Short, Short,
/// text, list all options /// Text, list all options.
Long, Long,
/// text, include description /// Text, include description.
Full, Full,
/// like full, but in reStructuredText format /// Like full, but in reStructuredText format.
ReST, ReST,
} }