pub struct FidelityBadge {
pub subject: Ref,
pub badge: Symbol,
pub level: u8,
pub evidence: Ref,
}Expand description
A fidelity badge: how faithfully a subject realizes a named badge, at a given level, with a reference to the evidence behind it.
Fields§
§subject: RefWhat the badge is about (typically a profile symbol ref).
badge: SymbolThe badge name.
level: u8Fidelity level, higher meaning more faithful.
evidence: RefReference to the evidence (typically a conformance test) for the badge.
Implementations§
Source§impl FidelityBadge
impl FidelityBadge
Sourcepub fn new(subject: Ref, badge: Symbol, level: u8, evidence: Ref) -> Self
pub fn new(subject: Ref, badge: Symbol, level: u8, evidence: Ref) -> Self
Construct a badge from its subject, name, level, and evidence.
Sourcepub fn to_constructor_args(&self) -> Vec<Expr>
pub fn to_constructor_args(&self) -> Vec<Expr>
Encode this badge as constructor arguments for the standard/FidelityBadge class.
Sourcepub fn from_constructor_args(args: Vec<Expr>) -> Result<Self>
pub fn from_constructor_args(args: Vec<Expr>) -> Result<Self>
Decode a badge from standard/FidelityBadge constructor arguments.
Trait Implementations§
Source§impl Clone for FidelityBadge
impl Clone for FidelityBadge
Source§fn clone(&self) -> FidelityBadge
fn clone(&self) -> FidelityBadge
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 FidelityBadge
impl Debug for FidelityBadge
impl Eq for FidelityBadge
Source§impl PartialEq for FidelityBadge
impl PartialEq for FidelityBadge
Source§fn eq(&self, other: &FidelityBadge) -> bool
fn eq(&self, other: &FidelityBadge) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for FidelityBadge
Auto Trait Implementations§
impl Freeze for FidelityBadge
impl RefUnwindSafe for FidelityBadge
impl Send for FidelityBadge
impl Sync for FidelityBadge
impl Unpin for FidelityBadge
impl UnsafeUnpin for FidelityBadge
impl UnwindSafe for FidelityBadge
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.