#[non_exhaustive]pub struct SourceRenderOptions {
pub context_lines: usize,
}Expand description
Options for source-context diagnostic rendering.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.context_lines: usizeNumber of source lines to render before and after the primary line.
The default 0 preserves compact rendering with only the diagnostic
line. Nonzero values include up to that many neighboring source lines on
each side for both primary and related spans.
Trait Implementations§
Source§impl Clone for SourceRenderOptions
impl Clone for SourceRenderOptions
Source§fn clone(&self) -> SourceRenderOptions
fn clone(&self) -> SourceRenderOptions
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 moreimpl Copy for SourceRenderOptions
Source§impl Debug for SourceRenderOptions
impl Debug for SourceRenderOptions
Source§impl Default for SourceRenderOptions
impl Default for SourceRenderOptions
Source§fn default() -> SourceRenderOptions
fn default() -> SourceRenderOptions
Returns the “default value” for a type. Read more
impl Eq for SourceRenderOptions
Source§impl PartialEq for SourceRenderOptions
impl PartialEq for SourceRenderOptions
impl StructuralPartialEq for SourceRenderOptions
Auto Trait Implementations§
impl Freeze for SourceRenderOptions
impl RefUnwindSafe for SourceRenderOptions
impl Send for SourceRenderOptions
impl Sync for SourceRenderOptions
impl Unpin for SourceRenderOptions
impl UnsafeUnpin for SourceRenderOptions
impl UnwindSafe for SourceRenderOptions
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