pub struct AttestedCount {
pub value: Option<u32>,
pub provenance: FieldProvenance,
pub source: String,
pub reason: Option<String>,
}Expand description
A count with its provenance. Separate from AttestedText because a wave, a commit
tally and an evidence count are numbers a caller does arithmetic on, and a number
rendered as a string is a number every client has to parse back.
Fields§
§value: Option<u32>The number, absent exactly when the provenance is unknown.
provenance: FieldProvenanceWhere it came from.
source: StringThe one place a reader goes to check it.
reason: Option<String>Why the provenance is what it is, when that is worth a sentence.
Implementations§
Trait Implementations§
Source§impl Clone for AttestedCount
impl Clone for AttestedCount
Source§fn clone(&self) -> AttestedCount
fn clone(&self) -> AttestedCount
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AttestedCount
impl Debug for AttestedCount
Source§impl<'de> Deserialize<'de> for AttestedCount
impl<'de> Deserialize<'de> for AttestedCount
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>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for AttestedCount
Source§impl JsonSchema for AttestedCount
impl JsonSchema for AttestedCount
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreSource§impl PartialEq for AttestedCount
impl PartialEq for AttestedCount
Source§fn eq(&self, other: &AttestedCount) -> bool
fn eq(&self, other: &AttestedCount) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for AttestedCount
impl Serialize for AttestedCount
impl StructuralPartialEq for AttestedCount
Auto Trait Implementations§
impl Freeze for AttestedCount
impl RefUnwindSafe for AttestedCount
impl Send for AttestedCount
impl Sync for AttestedCount
impl Unpin for AttestedCount
impl UnsafeUnpin for AttestedCount
impl UnwindSafe for AttestedCount
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.