|
|
@@ -10,7 +10,7 @@ use {
|
|
|
|
|
|
/// Represents a binary (bincode-serialized) stream update sent
|
|
|
/// from the publisher to the router.
|
|
|
-#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
|
|
|
+#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
|
|
|
#[serde(rename_all = "camelCase")]
|
|
|
pub struct PriceFeedDataV2 {
|
|
|
pub price_feed_id: PriceFeedId,
|
|
|
@@ -36,7 +36,7 @@ pub struct PriceFeedDataV2 {
|
|
|
/// Old Represents a binary (bincode-serialized) stream update sent
|
|
|
/// from the publisher to the router.
|
|
|
/// Superseded by `PriceFeedData`.
|
|
|
-#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
|
|
|
+#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
|
|
|
#[serde(rename_all = "camelCase")]
|
|
|
pub struct PriceFeedDataV1 {
|
|
|
pub price_feed_id: PriceFeedId,
|
|
|
@@ -75,14 +75,14 @@ impl From<PriceFeedDataV1> for PriceFeedDataV2 {
|
|
|
|
|
|
/// A response sent from the server to the publisher client.
|
|
|
/// Currently only serde errors are reported back to the client.
|
|
|
-#[derive(Debug, Clone, Serialize, Deserialize, From)]
|
|
|
+#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize, From)]
|
|
|
#[serde(tag = "type")]
|
|
|
#[serde(rename_all = "camelCase")]
|
|
|
pub enum ServerResponse {
|
|
|
UpdateDeserializationError(UpdateDeserializationErrorResponse),
|
|
|
}
|
|
|
/// Sent to the publisher if the binary data could not be parsed
|
|
|
-#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
|
|
|
+#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
|
|
|
#[serde(rename_all = "camelCase")]
|
|
|
pub struct UpdateDeserializationErrorResponse {
|
|
|
pub error: String,
|