pub struct Diagnostic { /* private fields */ }Expand description
一条诊断。
Implementations§
Source§impl Diagnostic
impl Diagnostic
Sourcepub fn with_segment(self, segment: usize) -> Self
pub fn with_segment(self, segment: usize) -> Self
关联到链上的第几段。
Sourcepub fn with_offset(self, offset: usize) -> Self
pub fn with_offset(self, offset: usize) -> Self
关联源码字节偏移(空值判别扫描用)。
Sourcepub fn with_suggestion(self, suggestion: impl Into<String>) -> Self
pub fn with_suggestion(self, suggestion: impl Into<String>) -> Self
给出一条可直接贴给上游的整改建议。
Sourcepub fn suggestion(&self) -> Option<&str>
pub fn suggestion(&self) -> Option<&str>
整改建议。
Trait Implementations§
Source§impl Clone for Diagnostic
impl Clone for Diagnostic
Source§impl Debug for Diagnostic
impl Debug for Diagnostic
Source§impl Display for Diagnostic
impl Display for Diagnostic
impl Eq for Diagnostic
Source§impl PartialEq for Diagnostic
impl PartialEq for Diagnostic
impl StructuralPartialEq for Diagnostic
Auto Trait Implementations§
impl Forget for Diagnostic
impl Freeze for Diagnostic
impl Move for Diagnostic
impl RefUnwindSafe for Diagnostic
impl Send for Diagnosticwhere
RawVecInner: Send,
impl Sync for Diagnosticwhere
RawVecInner: Sync,
impl Unpin for Diagnostic
impl UnsafeUnpin for Diagnostic
impl UnwindSafe for Diagnosticwhere
RawVecInner: UnwindSafe,
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