Struct redgold_schema::structs::ObservationMetadata
source · pub struct ObservationMetadata {
pub observed_hash: Option<Hash>,
pub observation_type: i32,
pub state: i32,
pub validation_confidence: Option<TrustData>,
pub struct_metadata: Option<StructMetadata>,
pub validation_liveness: i32,
pub liveness_confidence: Option<TrustData>,
}Expand description
Metadata associated with some node observing and validating data associated with some hash
Fields§
§observed_hash: Option<Hash>The data under consideration which has had some validation performed for it.
observation_type: i32Whether or not we have fully resolved all prior dependencies associated with the data internally
state: i32How much we have accepted this data, whether or not sufficient time has passed to consider it confirmed
validation_confidence: Option<TrustData>The degree of certainty associated with our validation, based on trustworthiness of information received from other peers
struct_metadata: Option<StructMetadata>Information about this object itself, such as time produced and hash representations of it
validation_liveness: i32Whether or not we consider this data already confirmed, or in process.
liveness_confidence: Option<TrustData>How certain we are of the liveness.
Implementations§
source§impl ObservationMetadata
impl ObservationMetadata
sourcepub fn observation_type(&self) -> ValidationType
pub fn observation_type(&self) -> ValidationType
Returns the enum value of observation_type, or the default if the field is set to an invalid enum value.
sourcepub fn set_observation_type(&mut self, value: ValidationType)
pub fn set_observation_type(&mut self, value: ValidationType)
Sets observation_type to the provided enum value.
sourcepub fn state(&self) -> State
pub fn state(&self) -> State
Returns the enum value of state, or the default if the field is set to an invalid enum value.
sourcepub fn validation_liveness(&self) -> ValidationLiveness
pub fn validation_liveness(&self) -> ValidationLiveness
Returns the enum value of validation_liveness, or the default if the field is set to an invalid enum value.
sourcepub fn set_validation_liveness(&mut self, value: ValidationLiveness)
pub fn set_validation_liveness(&mut self, value: ValidationLiveness)
Sets validation_liveness to the provided enum value.
Trait Implementations§
source§impl Clone for ObservationMetadata
impl Clone for ObservationMetadata
source§fn clone(&self) -> ObservationMetadata
fn clone(&self) -> ObservationMetadata
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl Debug for ObservationMetadata
impl Debug for ObservationMetadata
source§impl Default for ObservationMetadata
impl Default for ObservationMetadata
source§impl<'de> Deserialize<'de> for ObservationMetadata
impl<'de> Deserialize<'de> for ObservationMetadata
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>,
source§impl Hash for ObservationMetadata
impl Hash for ObservationMetadata
source§impl HashClear for ObservationMetadata
impl HashClear for ObservationMetadata
fn hash_clear(&mut self)
source§impl Message for ObservationMetadata
impl Message for ObservationMetadata
source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
source§fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>where
B: BufMut,
Self: Sized,
fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>where B: BufMut, 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<B>(&self, buf: &mut B) -> Result<(), EncodeError>where
B: BufMut,
Self: Sized,
fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>where B: BufMut, 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<B>(buf: B) -> Result<Self, DecodeError>where
B: Buf,
Self: Default,
fn decode<B>(buf: B) -> Result<Self, DecodeError>where B: Buf, Self: Default,
source§fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>where
B: Buf,
Self: Default,
fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>where B: Buf, Self: Default,
source§fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>where
B: Buf,
Self: Sized,
fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>where B: Buf, Self: Sized,
self. Read moresource§fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>where
B: Buf,
Self: Sized,
fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>where B: Buf, Self: Sized,
self.source§impl PartialEq for ObservationMetadata
impl PartialEq for ObservationMetadata
source§fn eq(&self, other: &ObservationMetadata) -> bool
fn eq(&self, other: &ObservationMetadata) -> bool
self and other values to be equal, and is used
by ==.