pub struct Layout { /* private fields */ }Expand description
A Layout records what same-same answered for each pair that a pass
settled, and the files that hold a pair that the formatter left
unsettled.
Implementations§
Source§impl Layout
impl Layout
Sourcepub fn same(&self, pair: &Pair) -> bool
pub fn same(&self, pair: &Pair) -> bool
same returns whether the pair pair means the same: whether its
texts are equal, or same-same finds them the same, apart from the
named things that [format] reads as the same (CLI-4_AC-44,
CLI-4_AC-45, CLI-4_AC-109).
Sourcepub fn warning(&self, pair: &Pair) -> Option<Finding>
pub fn warning(&self, pair: &Pair) -> Option<Finding>
warning returns the warning that the formatter failed on the pair
pair or didn’t start, when it did and the pair is stale
(CLI-4_AC-49).
Sourcepub fn line(&self, pair: &Pair) -> Option<usize>
pub fn line(&self, pair: &Pair) -> Option<usize>
line returns the first line of the source that differs, for a
stale pair where same-same gives it (CLI-4_AC-110).
Trait Implementations§
Auto Trait Implementations§
impl Forget for Layout
impl Freeze for Layout
impl Move for Layout
impl RefUnwindSafe for Layout
impl Send for Layout
impl Sync for Layout
impl Unpin for Layout
impl UnsafeUnpin for Layout
impl UnwindSafe for Layout
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