pub struct ShapeReport {
pub id: Ref,
pub shape: Ref,
pub target: Ref,
pub accepted: bool,
pub score: MatchScore,
pub captures: Ref,
pub diagnostics: Vec<Diagnostic>,
}Expand description
The canonical record of a shape check: who was checked against what, the outcome, and the diagnostics.
A report is interned content (the id) and is the evidence backing the
satisfies-shape satisfaction claim published when a match is accepted.
The kernel defines this record and that claim; libraries produce reports by
running the shape protocol.
Fields§
§id: RefContent reference identifying this report.
shape: RefReference to the shape that was checked.
target: RefReference to the value or expr that was checked.
accepted: boolWhether the target satisfied the shape.
score: MatchScoreThe match score.
captures: RefReference to the interned captures datum.
diagnostics: Vec<Diagnostic>Diagnostics gathered during the check.
Implementations§
Source§impl ShapeReport
impl ShapeReport
Sourcepub fn canonical_datum(&self) -> Datum
pub fn canonical_datum(&self) -> Datum
Build the canonical Datum for this report (excluding its own id).
Trait Implementations§
Source§impl Clone for ShapeReport
impl Clone for ShapeReport
Source§fn clone(&self) -> ShapeReport
fn clone(&self) -> ShapeReport
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 ShapeReport
impl Debug for ShapeReport
impl Eq for ShapeReport
Source§impl PartialEq for ShapeReport
impl PartialEq for ShapeReport
Source§fn eq(&self, other: &ShapeReport) -> bool
fn eq(&self, other: &ShapeReport) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ShapeReport
Auto Trait Implementations§
impl Freeze for ShapeReport
impl RefUnwindSafe for ShapeReport
impl Send for ShapeReport
impl Sync for ShapeReport
impl Unpin for ShapeReport
impl UnsafeUnpin for ShapeReport
impl UnwindSafe for ShapeReport
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