pub struct RoundTripConfig {
pub normalize_whitespace: bool,
pub max_diff_chars: usize,
pub ignore_spans: bool,
}Expand description
Configuration for round-trip checking.
Fields§
§normalize_whitespace: boolWhether to collapse multiple whitespace characters into one before comparing printed forms.
max_diff_chars: usizeMaximum number of differing characters before the result is reported as a structure difference (0 = unlimited).
ignore_spans: boolIf true, span information is ignored when comparing AST nodes.
Implementations§
Source§impl RoundTripConfig
impl RoundTripConfig
Sourcepub fn with_normalize_whitespace(self, v: bool) -> Self
pub fn with_normalize_whitespace(self, v: bool) -> Self
Set the normalize_whitespace option.
Sourcepub fn with_max_diff_chars(self, n: usize) -> Self
pub fn with_max_diff_chars(self, n: usize) -> Self
Set the max_diff_chars option.
Sourcepub fn with_ignore_spans(self, v: bool) -> Self
pub fn with_ignore_spans(self, v: bool) -> Self
Set the ignore_spans option.
Trait Implementations§
Source§impl Clone for RoundTripConfig
impl Clone for RoundTripConfig
Source§fn clone(&self) -> RoundTripConfig
fn clone(&self) -> RoundTripConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RoundTripConfig
impl Debug for RoundTripConfig
Auto Trait Implementations§
impl Freeze for RoundTripConfig
impl RefUnwindSafe for RoundTripConfig
impl Send for RoundTripConfig
impl Sync for RoundTripConfig
impl Unpin for RoundTripConfig
impl UnsafeUnpin for RoundTripConfig
impl UnwindSafe for RoundTripConfig
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