// Structs that impl Into because WhatEverStruct does not impl Serde use serde::{Deserialize, Serialize}; use tui::widgets::BorderType; #[derive(Serialize, Deserialize, Clone, Copy)] pub enum BorderTypeSerde { Plain, Rounded, Double, Thick, } impl Default for BorderTypeSerde { fn default() -> Self { Self::Rounded } } impl Into for BorderTypeSerde { fn into(self) -> BorderType { match self { Self::Plain => BorderType::Plain, Self::Rounded => BorderType::Rounded, Self::Thick => BorderType::Thick, Self::Double => BorderType::Double, } } }