[][src]Struct mifi_rs::mifi::Mifi

pub struct Mifi<T> {
    pub topic: String,
    pub frq: f64,
    pub market: String,
    pub history: BTreeMap<String, T>,
    pub portfolio: HashMap<String, T>,
    pub format: String,
    pub real: T,
    pub zip: bool,
}

此行情协议主要是为沟通多个行情之间的数据然后进行交换切割, 注意T是某一类数据, 比如k线数据, topic: 主题 frq: 周期 market:市场 history: 历史数据,注意是datetime作为key, 数据作为value,逆序 portfolio: 组合信息,比如指数 format: 格式成指定数据源 real: 实时行情 zip:是否压缩发送

Fields

topic: Stringfrq: f64market: Stringhistory: BTreeMap<String, T>portfolio: HashMap<String, T>format: Stringreal: Tzip: bool

Implementations

impl<T> Mifi<T> where
    T: Handler + Serialize
[src]

pub fn to_json(&self) -> String[src]

pub fn hqchart_trend(&self) -> HqTrend[src]

Trait Implementations

impl<T: Clone> Clone for Mifi<T>[src]

impl<T: Debug> Debug for Mifi<T>[src]

impl<'de, T> Deserialize<'de> for Mifi<T> where
    T: Deserialize<'de>, 
[src]

impl<T> Serialize for Mifi<T> where
    T: Serialize
[src]

Auto Trait Implementations

impl<T> RefUnwindSafe for Mifi<T> where
    T: RefUnwindSafe
[src]

impl<T> Send for Mifi<T> where
    T: Send
[src]

impl<T> Sync for Mifi<T> where
    T: Sync
[src]

impl<T> Unpin for Mifi<T> where
    T: Unpin
[src]

impl<T> UnwindSafe for Mifi<T> where
    T: RefUnwindSafe + UnwindSafe
[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.