ds: fix compilation

This commit is contained in:
realaltffour 2020-06-28 14:54:01 +03:00
parent 8e0be31bbe
commit 9588e394bc
No known key found for this signature in database
GPG Key ID: C1265D839D44DCB1
8 changed files with 15 additions and 8 deletions

View File

@ -1,2 +1,5 @@
pub mod portfolio;
pub mod position;
pub mod session;
pub mod order;
pub mod account;

View File

@ -1,7 +1,5 @@
use chrono::{DateTime, NaiveDateTime};
use std::next::Ipv4Addr;
static EXPIY_DATE: DateTime<Utc> = DateTime::<Utc>::from_utc(NaiveDateTime::from_ymd(0, 0, 30), Utc);
use chrono::{DateTime, Utc};
use std::net::Ipv4Addr;
#[derive(PartialEq, Debug)]
pub struct SessionID {

View File

View File

@ -1,2 +1,4 @@
pub mod account;
pub mod asset;
pub mod server;
pub mod message;

View File

@ -1,10 +1,11 @@
use std::collections::HashMap;
use crate::ds::server::worker_server::WorkerServer;
use crate::ds::account::session::SessionID;
use crate::ds::asset::stock::Stock;
#[derive(Default, PartialEq, Debug)]
pub struct MasterState {
pub worker_servers: Vec<WorkerServer>,
pub active_sessions: Vec<SessionID>,
pub assets_data: HashMap,
pub assets_data: HashMap<String, Stock>,
}

View File

@ -0,0 +1,3 @@
pub mod master_state;
pub mod worker_state;
pub mod worker_server;

View File

@ -1,6 +1,6 @@
use std::next::Ipv4Addr;
use std::net::Ipv4Addr;
#[derive(Default, PartialEq, Debug)]
#[derive(PartialEq, Debug)]
pub struct WorkerServer {
pub name: String,
pub server_ip: Ipv4Addr,

View File

@ -1,4 +1,4 @@
use std::next::Ipv4Addr;
use std::net::Ipv4Addr;
use crate::ds::account::session::SessionID;