pub fn deserialize_vip_level<'de, D>(
deserializer: D,
) -> Result<OKXVipLevel, D::Error>where
D: Deserializer<'de>,
Expand description
Deserializes an OKX VIP level string (e.g., “Lv4”) into OKXVipLevel
.
OKX returns VIP levels as strings like “Lv0”, “Lv1”, …, “Lv9”. This function strips the “Lv” prefix and parses the numeric value.
§Errors
Returns an error if the string cannot be parsed into a valid VIP level.