Struct annotate_snippets::Renderer
source · pub struct Renderer { /* private fields */ }
Expand description
A renderer for Snippet
s
Implementations§
source§impl Renderer
impl Renderer
sourcepub const fn anonymized_line_numbers(
self,
anonymized_line_numbers: bool
) -> Self
pub const fn anonymized_line_numbers( self, anonymized_line_numbers: bool ) -> Self
Anonymize line numbers
This enables (or disables) line number anonymization. When enabled, line numbers are replaced
with LL
.
§Example
--> $DIR/whitespace-trimming.rs:4:193
|
LL | ... let _: () = 42;
| ^^ expected (), found integer
|
sourcepub const fn margin(self, margin: Option<Margin>) -> Self
pub const fn margin(self, margin: Option<Margin>) -> Self
Set the margin for the output
This controls the various margins of the output.
§Example
error: expected type, found `22`
--> examples/footer.rs:29:25
|
26 | ... annotations: vec![SourceAnnotation {
| ---------------- info: while parsing this struct
...
29 | ... range: <22, 25>,
| ^^
|
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for Renderer
impl Send for Renderer
impl Sync for Renderer
impl Unpin for Renderer
impl UnwindSafe for Renderer
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