Struct codespan_reporting::term::views::RichDiagnostic
source · pub struct RichDiagnostic<'diagnostic, 'config, FileId> {
diagnostic: &'diagnostic Diagnostic<FileId>,
config: &'config Config,
}
Expand description
Output a richly formatted diagnostic, with source code previews.
Fields§
§diagnostic: &'diagnostic Diagnostic<FileId>
§config: &'config Config
Implementations§
source§impl<'diagnostic, 'config, FileId> RichDiagnostic<'diagnostic, 'config, FileId>
impl<'diagnostic, 'config, FileId> RichDiagnostic<'diagnostic, 'config, FileId>
pub fn new( diagnostic: &'diagnostic Diagnostic<FileId>, config: &'config Config, ) -> RichDiagnostic<'diagnostic, 'config, FileId>
pub fn render<'files>(
&self,
files: &'files impl Files<'files, FileId = FileId>,
renderer: &mut Renderer<'_, '_>,
) -> Result<(), Error>where
FileId: 'files,
Auto Trait Implementations§
impl<'diagnostic, 'config, FileId> Freeze for RichDiagnostic<'diagnostic, 'config, FileId>
impl<'diagnostic, 'config, FileId> RefUnwindSafe for RichDiagnostic<'diagnostic, 'config, FileId>where
FileId: RefUnwindSafe,
impl<'diagnostic, 'config, FileId> Send for RichDiagnostic<'diagnostic, 'config, FileId>where
FileId: Sync,
impl<'diagnostic, 'config, FileId> Sync for RichDiagnostic<'diagnostic, 'config, FileId>where
FileId: Sync,
impl<'diagnostic, 'config, FileId> Unpin for RichDiagnostic<'diagnostic, 'config, FileId>
impl<'diagnostic, 'config, FileId> UnwindSafe for RichDiagnostic<'diagnostic, 'config, FileId>where
FileId: RefUnwindSafe,
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