Added system
This commit is contained in:
+13
-1
@@ -1,4 +1,4 @@
|
||||
use crate::types::{Account, ActivePosition, WatchListItem};
|
||||
use crate::types::{Account, ActivePosition, System, WatchListItem};
|
||||
|
||||
pub trait Formatted {
|
||||
fn get_formatted(&self) -> Vec<String>;
|
||||
@@ -55,6 +55,18 @@ impl Formatted for Account {
|
||||
}
|
||||
}
|
||||
|
||||
impl Formatted for System {
|
||||
fn get_formatted(&self) -> Vec<String> {
|
||||
vec![
|
||||
Property("Feed", format!("{:?}", self.feed)),
|
||||
Property("Exchange", self.exchange.clone()),
|
||||
Property("DEX", self.dex.clone()),
|
||||
Property("Latency", format!("{} ms", self.latency)),
|
||||
]
|
||||
.get_formatted()
|
||||
}
|
||||
}
|
||||
|
||||
impl Formatted for Property {
|
||||
fn get_formatted(&self) -> Vec<String> {
|
||||
vec![format!("\x1b[91m{}\x1b[0m", self.0), self.1.clone()]
|
||||
|
||||
Reference in New Issue
Block a user