This website works better with JavaScript.
git.jstrong.dev
Home
Explore
Help
Sign In
jstrong
/
markets
Watch
1
Star
0
Fork
0
Code
Issues
0
Pull Requests
0
Releases
5
Wiki
Activity
Browse Source
make `Side` repr(u8)
tags/v0.3.1
Jonathan Strong
4 years ago
parent
53a3992a5a
commit
1d705c2259
2 changed files
with
4 additions
and
3 deletions
Unified View
Diff Options
Show Stats
Download Patch File
Download Diff File
+1
-1
Cargo.toml
+3
-2
src/crypto.rs
+ 1
- 1
Cargo.toml
View File
@@ -1,6 +1,6 @@
[package]
[package]
name = "markets"
name = "markets"
version = "0.3.
0
"
version = "0.3.
1
"
authors = ["Jonathan Strong <jonathan.strong@gmail.com>"]
authors = ["Jonathan Strong <jonathan.strong@gmail.com>"]
edition = "2018"
edition = "2018"
description = "kind of like the http crate, except about tradeable markets"
description = "kind of like the http crate, except about tradeable markets"
+ 3
- 2
src/crypto.rs
View File
@@ -39,10 +39,11 @@ macro_rules! t {
/// which side of the transaction (buying or selling)
/// which side of the transaction (buying or selling)
/// a price/trade is
/// a price/trade is
///
///
#[repr(u8)]
#[derive(Debug, PartialEq, Clone, Copy, Eq, Serialize)]
#[derive(Debug, PartialEq, Clone, Copy, Eq, Serialize)]
pub enum Side {
pub enum Side {
Bid,
Ask
Bid
= 1
,
Ask
= 2,
}
}
impl TryFrom<u8> for Side {
impl TryFrom<u8> for Side {
Write
Preview
Loading…
Cancel
Save