From dc38f9d19546d3f2f91d392f8f51e16bf53d1986 Mon Sep 17 00:00:00 2001 From: scoobybejesus Date: Sat, 12 Oct 2019 14:32:20 -0400 Subject: [PATCH] Improved documentation. --- src/core_functions.rs | 7 ++++++- src/main.rs | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/core_functions.rs b/src/core_functions.rs index 4762c7f..890e5e0 100644 --- a/src/core_functions.rs +++ b/src/core_functions.rs @@ -16,6 +16,8 @@ use crate::csv_import_accts_txns; use crate::import_cost_proceeds_etc; use crate::create_lots_mvmts; +/// An `InventoryMethod` determines the order in which a `Lot` is chosen when posting +/// `ActionRecord` amounts as individual `Movement`s. #[derive(Clone, Debug, PartialEq, StructOpt)] pub enum InventoryCostingMethod { /// 1. LIFO according to the order the lot was created. @@ -40,7 +42,10 @@ impl fmt::Display for InventoryCostingMethod { } } - +/// `ImportProcessParameters` are determined from command-line args and/or wizard input from the user. +/// They are the settings that allow the software to carry out the importing-from-csv of +/// `Account`s and `Transaction`s, creation of `Lot`s and `Movement`s, addition of cost basis and proceeds +/// to `Movement`s, and application of like-kind treatment, in a specific and automated fashion. pub struct ImportProcessParameters { pub export_path: PathBuf, pub home_currency: String, diff --git a/src/main.rs b/src/main.rs index cf62ecf..2b1d622 100644 --- a/src/main.rs +++ b/src/main.rs @@ -86,7 +86,7 @@ pub(crate) struct Options { /// Inventory costing method (in terms of lot selection, i.e., LIFO, FIFO, etc.). /// There are currently four options (1 through 4). - #[structopt(name = "method", short, long, default_value = "1", parse(from_os_str), long_help = + #[structopt(name = "method number for lot selection", short, long, default_value = "1", parse(from_os_str), long_help = r" 1. LIFO according to the order the lot was created. 2. LIFO according to the basis date of the lot. 3. FIFO according to the order the lot was created.