From 74822a9f2dc513a0892a262f1f38cace23e14856 Mon Sep 17 00:00:00 2001 From: Taylor Bockman Date: Wed, 13 Dec 2017 21:30:22 -0800 Subject: [PATCH] type documentation --- src/options.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/options.rs b/src/options.rs index a576ed9..09de1a3 100644 --- a/src/options.rs +++ b/src/options.rs @@ -4,6 +4,7 @@ //! of the nicer parts of typechecking. #[derive(Debug)] +/// The `EngineOptionType` type used to indicate what type of option the GUI should display enum EngineOptionType { Check, Spin, @@ -13,6 +14,7 @@ enum EngineOptionType { } #[derive(Debug)] +/// The `EngineOptionDataType` type used to indicate the type of the `EngineOption` setting enum EngineOptionDataType { DefaultVal, // `Default` is reserved so `DefaultVal` is used Min, @@ -20,7 +22,15 @@ enum EngineOptionDataType { Var, } +#[derive(Debug)] +/// The `EngineOptionDataValue` makes the data type generic so one `EngineOption` can represent everything +/// This would be set to the type of the engine option (ex. i32) +struct EngineOptionDataValue { + value: T, +} + #[derive(Debug, PartialEq)] +/// The `EngineOption` type is the overarching type representing a single configurable engine option struct EngineOption { name: String, option_type: EngineOptionType,