From 00f3a6575ca0deabb6263d27eaa443da39686215 Mon Sep 17 00:00:00 2001 From: Dietmar Maurer Date: Mon, 2 Dec 2019 19:50:04 +0100 Subject: [PATCH] proxmox-api/src/format.rs: add missing docs --- proxmox-api/src/format.rs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/proxmox-api/src/format.rs b/proxmox-api/src/format.rs index 484ad580..9d83eb0f 100644 --- a/proxmox-api/src/format.rs +++ b/proxmox-api/src/format.rs @@ -68,7 +68,10 @@ fn test_wrap_text() { assert_eq!(wrapped, expect); } -/// TODO: Document output format. +/// Helper to format the type text +/// +/// The result is a short string including important constraints, for +/// example `` (0 - N)``. pub fn get_schema_type_text(schema: &Schema, _style: ParameterDisplayStyle) -> String { match schema { Schema::Null => String::from(""), // should not happen @@ -85,7 +88,7 @@ pub fn get_schema_type_text(schema: &Schema, _style: ParameterDisplayStyle) -> S } } -/// TODO: Document output format. +/// Helper to format an object property, including name, type and description. pub fn get_property_description( name: &str, schema: &Schema, @@ -246,7 +249,7 @@ fn dump_method_definition(method: &str, path: &str, def: Option<&ApiMethod>) -> } } -/// TODO: Document output format. +/// Generate ReST Documentaion for a complete API defined by a ``Router``. pub fn dump_api( output: &mut dyn Write, router: &Router,