pub struct RenderOptions<'a> {
pub path: Option<&'a str>,
pub tab_width: u32,
pub max_width: u32,
}Expand description
How Diagnostic::render lays a code frame out.
Fields§
§path: Option<&'a str>A name for the source, like a file’s path, shown before the line and column.
tab_width: u32A tab moves to the next multiple of this many columns.
max_width: u32The most columns of a line shown. A longer line, like a minified
script’s, is cut to a window around what’s marked on it, with …
where it’s cut.
Trait Implementations§
Source§impl<'a> Clone for RenderOptions<'a>
impl<'a> Clone for RenderOptions<'a>
Source§fn clone(&self) -> RenderOptions<'a>
fn clone(&self) -> RenderOptions<'a>
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<'a> Copy for RenderOptions<'a>
Source§impl<'a> Debug for RenderOptions<'a>
impl<'a> Debug for RenderOptions<'a>
Source§impl Default for RenderOptions<'_>
impl Default for RenderOptions<'_>
Source§fn default() -> RenderOptions<'_>
fn default() -> RenderOptions<'_>
Returns the “default value” for a type. Read more
impl<'a> Eq for RenderOptions<'a>
Source§impl<'a> Hash for RenderOptions<'a>
impl<'a> Hash for RenderOptions<'a>
Source§impl<'a> PartialEq for RenderOptions<'a>
impl<'a> PartialEq for RenderOptions<'a>
impl<'a> StructuralPartialEq for RenderOptions<'a>
Auto Trait Implementations§
impl<'a> Forget for RenderOptions<'a>
impl<'a> Freeze for RenderOptions<'a>
impl<'a> Move for RenderOptions<'a>
impl<'a> RefUnwindSafe for RenderOptions<'a>
impl<'a> Send for RenderOptions<'a>
impl<'a> Sync for RenderOptions<'a>
impl<'a> Unpin for RenderOptions<'a>
impl<'a> UnsafeUnpin for RenderOptions<'a>
impl<'a> UnwindSafe for RenderOptions<'a>
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