changeset 18: |
a1137af05c8d |
author: |
ellis <ellis@rwest.io> |
date: |
Mon, 29 May 2023 21:46:21 -0400 |
permissions: |
-rw-r--r-- |
description: |
removed fig, use sexprs instead |
1 /// common trait for all config modules. This trait provides functions 2 /// for de/serializing to/from RON, updating fields, and formatting. 3 use serde::{Serialize, Deserialize}; 5 use std::collections::HashMap as M; 6 use std::path::PathBuf; 7 use std::string::String as S; 8 use std::error::Error as E; 9 use std::boxed::Box as B; 10 type R<X> = std::result::Result<X,B<dyn E>>; 12 pub trait Configure: Objective { 13 fn update(&self) -> R<()> { 18 #[derive(Serialize, Deserialize, Debug, Default)] 19 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,