pub struct ReportableClaim { /* private fields */ }Expand description
Metadata for a claim that may be shown, exported, or used as authority.
effective_ceiling is private and always recomputed from runtime mode,
authority class, and requested ceiling. Callers can ask for a high ceiling,
but they cannot construct a reportable claim above its weakest evidence.
Implementations§
Source§impl ReportableClaim
impl ReportableClaim
Sourcepub fn new(
claim: impl Into<String>,
runtime_mode: RuntimeMode,
authority_class: AuthorityClass,
proof_state: ClaimProofState,
requested_ceiling: ClaimCeiling,
) -> Self
pub fn new( claim: impl Into<String>, runtime_mode: RuntimeMode, authority_class: AuthorityClass, proof_state: ClaimProofState, requested_ceiling: ClaimCeiling, ) -> Self
Construct claim metadata with the effective ceiling clamped to the weakest supporting signal.
Sourcepub const fn runtime_mode(&self) -> RuntimeMode
pub const fn runtime_mode(&self) -> RuntimeMode
Runtime mode used to evaluate this claim.
Authority class used to evaluate this claim.
Sourcepub const fn proof_state(&self) -> ClaimProofState
pub const fn proof_state(&self) -> ClaimProofState
Proof state used to evaluate this claim.
Sourcepub const fn requested_ceiling(&self) -> ClaimCeiling
pub const fn requested_ceiling(&self) -> ClaimCeiling
Ceiling requested by the producer.
Sourcepub const fn effective_ceiling(&self) -> ClaimCeiling
pub const fn effective_ceiling(&self) -> ClaimCeiling
Effective ceiling after weakest-link downgrade.
Sourcepub fn downgrade_reasons(&self) -> &[String]
pub fn downgrade_reasons(&self) -> &[String]
Reasons this claim was downgraded.
Sourcepub fn downgraded_to(
self,
ceiling: ClaimCeiling,
reason: impl Into<String>,
) -> Self
pub fn downgraded_to( self, ceiling: ClaimCeiling, reason: impl Into<String>, ) -> Self
Return a copy downgraded to the supplied ceiling.
Sourcepub fn mix_to_weakest(self, other: &Self, claim: impl Into<String>) -> Self
pub fn mix_to_weakest(self, other: &Self, claim: impl Into<String>) -> Self
Mix this claim with another claim and return the weakest truthful metadata for the combined assertion.
Trait Implementations§
Source§impl Clone for ReportableClaim
impl Clone for ReportableClaim
Source§fn clone(&self) -> ReportableClaim
fn clone(&self) -> ReportableClaim
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ReportableClaim
impl Debug for ReportableClaim
Source§impl<'de> Deserialize<'de> for ReportableClaim
impl<'de> Deserialize<'de> for ReportableClaim
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 JsonSchema for ReportableClaim
impl JsonSchema for ReportableClaim
Source§fn schema_name() -> String
fn schema_name() -> String
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
$ref keyword. Read moreSource§impl PartialEq for ReportableClaim
impl PartialEq for ReportableClaim
Source§fn eq(&self, other: &ReportableClaim) -> bool
fn eq(&self, other: &ReportableClaim) -> bool
self and other values to be equal, and is used by ==.