Browse Source

type documentation

ag-yep
Taylor Bockman 7 years ago
parent
commit
74822a9f2d
  1. 10
      src/options.rs

10
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<T> {
value: T,
}
#[derive(Debug, PartialEq)]
/// The `EngineOption` type is the overarching type representing a single configurable engine option
struct EngineOption<T> {
name: String,
option_type: EngineOptionType,

Loading…
Cancel
Save