pub struct SourceComparisonView {
pub symbol: String,
pub interval: String,
pub first: String,
pub second: String,
pub first_bars: u32,
pub second_bars: u32,
pub shared: u32,
pub only_first: u32,
pub only_second: u32,
pub summary: String,
pub diverged: bool,
pub basis_mismatch: Option<String>,
}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.
What two sources say about the same instrument over the same window.
The verdict is [Self::summary] and the counts are beside it, deliberately:
two vendors disagreeing is the normal case and most of the ways they
disagree are not faults, so a bare count of differing bars is true, useless,
and the kind of thing that gets a check switched off.
Fields§
§symbol: String§interval: String§first: String§second: String§first_bars: u32§second_bars: u32Bar instants present in both.
only_first: u32Bars one has and the other does not. Independent of whether the shared ones agree: two sources can cover different sessions and match perfectly wherever they overlap.
only_second: u32§summary: String§diverged: boolTrue only for a genuine price disagreement — not for a rescaling, which is an adjustment difference with neither side wrong, and not for a coverage difference.
basis_mismatch: Option<String>Why the two sources cannot be compared at face value, when they cannot.
Neither axis it reports — how much of the tape a feed covers, and what
the prices are adjusted for — is visible in the bars, so this comes from
what each source declares rather than from any check. A thin feed and
the consolidated tape report the same prices; only the volumes differ,
and agreement deliberately does not compare volume.
Implementations§
Source§impl SourceComparisonView
impl SourceComparisonView
Sourcepub fn basis_mismatch(&self) -> &str
pub fn basis_mismatch(&self) -> &str
Returns the value of basis_mismatch, or the default value if basis_mismatch is unset.
Trait Implementations§
Source§impl Clone for SourceComparisonView
impl Clone for SourceComparisonView
Source§impl Debug for SourceComparisonView
impl Debug for SourceComparisonView
Source§impl Default for SourceComparisonView
impl Default for SourceComparisonView
Source§impl<'de> Deserialize<'de> for SourceComparisonView
impl<'de> Deserialize<'de> for SourceComparisonView
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for SourceComparisonView
Source§impl Hash for SourceComparisonView
impl Hash for SourceComparisonView
Source§impl Message for SourceComparisonView
impl Message for SourceComparisonView
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self.