Added system

This commit is contained in:
2026-07-15 08:19:21 -04:00
parent 5a138aecde
commit 4f9a498f41
3 changed files with 40 additions and 12 deletions
+13 -1
View File
@@ -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()]