changeset 11: |
d8f806f1d327 |
parent: |
8f59e2f1b8c4
|
author: |
ellis <ellis@rwest.io> |
date: |
Sun, 14 May 2023 21:27:04 -0400 |
permissions: |
-rw-r--r-- |
description: |
obj updates |
1 //! fig/src/lib.rs --- Configuration types 2 use serde::{Serialize, Deserialize}; 4 use std::collections::HashMap as M; 5 use std::path::PathBuf; 6 use std::string::String as S; 7 use std::error::Error as E; 8 use std::boxed::Box as B; 9 type R<X> = std::result::Result<X,B<dyn E>>; 11 /// common trait for all config modules. This trait provides functions 12 /// for de/serializing to/from RON, updating fields, and formatting. 13 pub trait Configure: Objective { 14 fn update(&self) -> R<()> { 19 #[derive(Serialize, Deserialize, Debug, Default)] 20 pub struct ShellConfig { 25 impl Objective for ShellConfig {} 27 #[derive(Serialize, Deserialize, Debug, Hash, Default)] 35 #[derive(Serialize, Deserialize, Debug, Default)] 43 #[derive(Serialize, Deserialize, Debug, Default)] 44 pub struct EditorConfig { 45 pub editor: EditorType, 47 pub init_file: PathBuf,