binance-rs icon indicating copy to clipboard operation
binance-rs copied to clipboard

are the single-variant enums required?

Open danieleades opened this issue 1 year ago • 0 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?

danieleades avatar Oct 31 '22 02:10 danieleades