wisespace-io / binance-rs

Rust Library for the Binance API

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

are the single-variant enums required?

danieleades opened this issue · comments

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?