Skip to content

Commit 4c2bdd5

Browse files
committed
chore(lazer): add missing derives
1 parent 31e93f0 commit 4c2bdd5

File tree

7 files changed

+17
-17
lines changed

7 files changed

+17
-17
lines changed

lazer/Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lazer/sdk/rust/protocol/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "pyth-lazer-protocol"
3-
version = "0.7.0"
3+
version = "0.7.1"
44
edition = "2021"
55
description = "Pyth Lazer SDK - protocol types."
66
license = "Apache-2.0"

lazer/sdk/rust/protocol/src/api.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use crate::router::{
44
Channel, Format, JsonBinaryEncoding, JsonUpdate, PriceFeedId, PriceFeedProperty, TimestampUs,
55
};
66

7-
#[derive(Debug, Clone, Serialize, Deserialize)]
7+
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
88
#[serde(rename_all = "camelCase")]
99
pub struct LatestPriceRequest {
1010
pub price_feed_ids: Vec<PriceFeedId>,
@@ -21,7 +21,7 @@ pub struct LatestPriceRequest {
2121
pub channel: Channel,
2222
}
2323

24-
#[derive(Debug, Clone, Serialize, Deserialize)]
24+
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
2525
#[serde(rename_all = "camelCase")]
2626
pub struct PriceRequest {
2727
pub timestamp: TimestampUs,
@@ -37,7 +37,7 @@ pub struct PriceRequest {
3737
pub channel: Channel,
3838
}
3939

40-
#[derive(Debug, Clone, Serialize, Deserialize)]
40+
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
4141
#[serde(rename_all = "camelCase")]
4242
pub struct ReducePriceRequest {
4343
pub payload: JsonUpdate,

lazer/sdk/rust/protocol/src/payload.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ pub enum PayloadPropertyValue {
4040
FundingTimestamp(Option<TimestampUs>),
4141
}
4242

43-
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
43+
#[derive(Debug, Clone, Default, PartialEq, Eq, Hash, Serialize, Deserialize)]
4444
pub struct AggregatedPriceFeedData {
4545
pub price: Option<Price>,
4646
pub best_bid_price: Option<Price>,

lazer/sdk/rust/protocol/src/publisher.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ use {
1010

1111
/// Represents a binary (bincode-serialized) stream update sent
1212
/// from the publisher to the router.
13-
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
13+
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
1414
#[serde(rename_all = "camelCase")]
1515
pub struct PriceFeedDataV2 {
1616
pub price_feed_id: PriceFeedId,
@@ -36,7 +36,7 @@ pub struct PriceFeedDataV2 {
3636
/// Old Represents a binary (bincode-serialized) stream update sent
3737
/// from the publisher to the router.
3838
/// Superseded by `PriceFeedData`.
39-
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
39+
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
4040
#[serde(rename_all = "camelCase")]
4141
pub struct PriceFeedDataV1 {
4242
pub price_feed_id: PriceFeedId,
@@ -75,14 +75,14 @@ impl From<PriceFeedDataV1> for PriceFeedDataV2 {
7575

7676
/// A response sent from the server to the publisher client.
7777
/// Currently only serde errors are reported back to the client.
78-
#[derive(Debug, Clone, Serialize, Deserialize, From)]
78+
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize, From)]
7979
#[serde(tag = "type")]
8080
#[serde(rename_all = "camelCase")]
8181
pub enum ServerResponse {
8282
UpdateDeserializationError(UpdateDeserializationErrorResponse),
8383
}
8484
/// Sent to the publisher if the binary data could not be parsed
85-
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
85+
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
8686
#[serde(rename_all = "camelCase")]
8787
pub struct UpdateDeserializationErrorResponse {
8888
pub error: String,

lazer/sdk/rust/protocol/src/router.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@ use {
1414
},
1515
};
1616

17-
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
17+
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, PartialOrd, Ord, Serialize, Deserialize)]
1818
pub struct PublisherId(pub u16);
1919

20-
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
20+
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, PartialOrd, Ord, Serialize, Deserialize)]
2121
pub struct PriceFeedId(pub u32);
2222

23-
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
23+
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, PartialOrd, Ord, Serialize, Deserialize)]
2424
pub struct ChannelId(pub u8);
2525

2626
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, PartialOrd, Ord, Serialize, Deserialize)]

lazer/sdk/rust/protocol/src/subscription.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,26 +8,26 @@ use {
88
};
99

1010
/// A request sent from the client to the server.
11-
#[derive(Debug, Clone, Serialize, Deserialize)]
11+
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
1212
#[serde(tag = "type")]
1313
#[serde(rename_all = "camelCase")]
1414
pub enum Request {
1515
Subscribe(SubscribeRequest),
1616
Unsubscribe(UnsubscribeRequest),
1717
}
1818

19-
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
19+
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, PartialOrd, Ord, Serialize, Deserialize)]
2020
pub struct SubscriptionId(pub u64);
2121

22-
#[derive(Debug, Clone, Serialize, Deserialize)]
22+
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
2323
#[serde(rename_all = "camelCase")]
2424
pub struct SubscribeRequest {
2525
pub subscription_id: SubscriptionId,
2626
#[serde(flatten)]
2727
pub params: SubscriptionParams,
2828
}
2929

30-
#[derive(Debug, Clone, Serialize, Deserialize)]
30+
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
3131
#[serde(rename_all = "camelCase")]
3232
pub struct UnsubscribeRequest {
3333
pub subscription_id: SubscriptionId,

0 commit comments

Comments
 (0)