5 releases

0.15.0 Jul 19, 2023
0.14.3 Jun 2, 2023
0.14.2 May 26, 2023
0.14.1 May 26, 2023
0.14.0 May 21, 2023

#21 in #ex3

Download history 116/week @ 2024-03-12 100/week @ 2024-03-19 91/week @ 2024-03-26 125/week @ 2024-04-02 56/week @ 2024-04-09 93/week @ 2024-04-16 140/week @ 2024-04-23 72/week @ 2024-04-30 85/week @ 2024-05-07 73/week @ 2024-05-14 95/week @ 2024-05-21 97/week @ 2024-05-28 81/week @ 2024-06-04 63/week @ 2024-06-11 81/week @ 2024-06-18 61/week @ 2024-06-25

308 downloads per month
Used in 33 crates (4 directly)

MIT license

14KB
254 lines

example to use

#[derive(Eq, PartialEq, Debug, Ex3Payload)]
struct PriceVolumePair {
    #[index(0)]
    price: BigUint,
    #[index(1)]
    volume: BigUint,
}

#[serde(transparent)]
#[derive(Eq, PartialEq, Debug, Serialize, Deserialize)]
struct MyStructId(String);

#[derive(Eq, PartialEq, Debug, Copy, Clone, Ex3PayloadEnum)]
enum OrderCategory {
    SpotLimit = 0,
    SpotMarket = 1,
    SpotSwap = 2,
}

#[derive(Eq, PartialEq, Debug, Ex3Payload)]
struct ComplexObject {
    #[index(0)]
    orders: Vec<PriceVolumePair>,
    #[index(1)]
    null_orders: Option<Vec<PriceVolumePair>>,
    #[index(2)]
    one_order: PriceVolumePair,
    #[index(3)]
    null_one_order: Option<PriceVolumePair>,
    #[index(4)]
    order_category: OrderCategory,
    #[index(5)]
    string_value: String,
    #[index(6)]
    null_string: Option<String>,
    #[index(7)]
    empty_string: String,
    #[index(8)]
    my_struct_id: MyStructId,
}

Dependencies

~1.5MB
~35K SLoC