use serde::Deserialize; use std::str::FromStr; use thiserror::Error; #[derive(Deserialize, Clone, Eq, PartialEq, Ord, PartialOrd, Hash, Debug, Default)] pub struct StockName(String); #[derive(Error, Debug)] pub enum StockNameParseError {} impl FromStr for StockName { type Err = StockNameParseError; fn from_str(s: &str) -> Result { Ok(Self(s.to_string())) } } pub(crate) struct Stock {}