pub struct SchemaDiagnostic { /* private fields */ }Expand description
A stable contract diagnostic enriched with schema source locations.
Implementations§
Source§impl SchemaDiagnostic
impl SchemaDiagnostic
Sourcepub fn new(diagnostic: Diagnostic, primary: Option<SourceSpan>) -> Self
pub fn new(diagnostic: Diagnostic, primary: Option<SourceSpan>) -> Self
Construct a source-aware schema diagnostic.
Attach a related source label.
Sourcepub const fn diagnostic(&self) -> &Diagnostic
pub const fn diagnostic(&self) -> &Diagnostic
Return the stable diagnostic payload.
Sourcepub fn primary(&self) -> Option<&SourceSpan>
pub fn primary(&self) -> Option<&SourceSpan>
Return the primary source span, if known.
Return related source labels.
Trait Implementations§
Source§impl Clone for SchemaDiagnostic
impl Clone for SchemaDiagnostic
Source§fn clone(&self) -> SchemaDiagnostic
fn clone(&self) -> SchemaDiagnostic
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 SchemaDiagnostic
impl Debug for SchemaDiagnostic
impl Eq for SchemaDiagnostic
Source§impl PartialEq for SchemaDiagnostic
impl PartialEq for SchemaDiagnostic
Source§impl Serialize for SchemaDiagnostic
impl Serialize for SchemaDiagnostic
impl StructuralPartialEq for SchemaDiagnostic
Auto Trait Implementations§
impl Freeze for SchemaDiagnostic
impl RefUnwindSafe for SchemaDiagnostic
impl Send for SchemaDiagnostic
impl Sync for SchemaDiagnostic
impl Unpin for SchemaDiagnostic
impl UnsafeUnpin for SchemaDiagnostic
impl UnwindSafe for SchemaDiagnostic
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