wisespace-io / binance-rs

Rust Library for the Binance API
Other
636 stars 287 forks source link

are the single-variant enums required? #186

Open danieleades opened 1 year ago

danieleades commented 1 year ago

there are a number of single-variant enums.

eg.

#[derive(Debug, Serialize, Deserialize, Clone)]
#[serde(rename_all = "camelCase")]
#[serde(untagged)]
pub enum Prices {
    AllPrices(Vec<SymbolPrice>),
}

they seem to be some kind of newtype pattern wrapping a Vec of some other object.

@wisespace-io can you explain what these are for? Is there a reason you can't use the bare Vecs?