[][src]Struct qifi_rs::data::Bar

pub struct Bar {
    pub high: f64,
    pub low: f64,
    pub close: f64,
    pub open: f64,
    pub volume: i64,
    pub amount: f64,
}

Bar格式的数据 high: 高 low: 低 close: 收 open: 开 volume: 成交量 amount: 成交金额 Examples

use crate::qifi_rs::{Bar, from_str,from_serde_value};
use serde_json::Value;
let test_json_str = r#"{
    "high":2900,
    "low":2880,
    "open": 2891,
    "close": 2899,
    "volume":100,
    "amount": 51454131
}"#;
let val:Value = from_str(test_json_str).unwrap();
let bar:Bar = from_serde_value(val).unwrap();
println!("{:?}",  bar);

Fields

high: f64low: f64close: f64open: f64volume: i64amount: f64

Trait Implementations

impl Clone for Bar[src]

impl Debug for Bar[src]

impl<'de> Deserialize<'de> for Bar[src]

impl Serialize for Bar[src]

Auto Trait Implementations

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> Same<T> for T

type Output = T

Should always be Self

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.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,