Skip to main content

FetchView

Struct FetchView 

Source
pub struct FetchView {
    pub instrument: String,
    pub source: String,
    pub interval: String,
    pub bars: u32,
    pub interpolated: u32,
    pub from: Option<String>,
    pub to: Option<String>,
    pub data_findings: Vec<DataFindingView>,
    pub revision: Option<String>,
    pub revised: bool,
    pub dividends: Option<u32>,
}
Expand description

Every shape at the root as well, because a window names a view on nearly every line and arvo_api::research::StudyView would be noise. The names do not collide: proto has no overloading and neither does this. Every shape at the root as well, because a window names a view on nearly every line and arvo_api::research::StudyView would be noise. The names do not collide: proto has no overloading and neither does this. Every shape at the root as well, because a window names a view on nearly every line and arvo_api::research::StudyView would be noise. The names do not collide: proto has no overloading and neither does this. What a fetch pulled in.

Fields§

§instrument: String§source: String

Which source answered. Part of the result rather than assumed, now that it is a choice: two vendors’ copies of one ticker are two datasets.

§interval: String§bars: u32§interpolated: u32

Gap-fill bars the server synthesised, which were dropped. Surfaced rather than hidden: a series that is a quarter invented is one to know about before drawing a conclusion from it.

§from: Option<String>§to: Option<String>§data_findings: Vec<DataFindingView>§revision: Option<String>

What changed against the copy already held, when there was one.

A re-fetch that rewrites history stales every finding on the instrument, correctly, via the content hash. This says why it changed — a re-adjustment after a corporate action leaves the underlying facts intact, a revision does not, and the two want different responses.

§revised: bool

True only when the change was a genuine disagreement about prices, rather than a rescaling or extra coverage.

§dividends: Option<u32>

Cash distributions stored alongside the bars.

None means the source does not serve dividends at all, which is a different fact from Some(0) — it looked, and the instrument paid none. Collapsing the two would report “no dividends” for an instrument that pays them, which is the direction the platform’s excess-return bias already leans.

Implementations§

Source§

impl FetchView

Source

pub fn from(&self) -> &str

Returns the value of from, or the default value if from is unset.

Source

pub fn to(&self) -> &str

Returns the value of to, or the default value if to is unset.

Source

pub fn revision(&self) -> &str

Returns the value of revision, or the default value if revision is unset.

Source

pub fn dividends(&self) -> u32

Returns the value of dividends, or the default value if dividends is unset.

Trait Implementations§

Source§

impl Clone for FetchView

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for FetchView

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for FetchView

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for FetchView

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Message for FetchView

Source§

fn encoded_len(&self) -> usize

Returns the encoded length of the message without a length delimiter.
Source§

fn clear(&mut self)

Clears the message, resetting all fields to their default.
Source§

fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>
where Self: Sized,

Encodes the message to a buffer. Read more
Source§

fn encode_to_vec(&self) -> Vec<u8> ⓘ
where Self: Sized,

Encodes the message to a newly allocated buffer.
Source§

fn encode_length_delimited( &self, buf: &mut impl BufMut, ) -> Result<(), EncodeError>
where Self: Sized,

Encodes the message with a length-delimiter to a buffer. Read more
Source§

fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘ
where Self: Sized,

Encodes the message with a length-delimiter to a newly allocated buffer.
Source§

fn decode(buf: impl Buf) -> Result<Self, DecodeError>
where Self: Default,

Decodes an instance of the message from a buffer. Read more
Source§

fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>
where Self: Default,

Decodes a length-delimited instance of the message from the buffer.
Source§

fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>
where Self: Sized,

Decodes an instance of the message from a buffer, and merges it into self. Read more
Source§

fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>
where Self: Sized,

Decodes a length-delimited instance of the message from buffer, and merges it into self.
Source§

impl PartialEq for FetchView

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for FetchView

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for FetchView

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

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

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.