pub struct Squashed {
pub text: String,
pub map: Vec<usize>,
}Expand description
A text squashed, each run of whitespace one space and the ends trimmed, with the byte offset in the original text of each byte of the result and one past the end, so a position found in the squashed text maps back to the text as written.
Fields§
§text: StringThe squashed text.
map: Vec<usize>map[i] is the offset in the original text of byte i.
Implementations§
Trait Implementations§
impl Eq for Squashed
impl StructuralPartialEq for Squashed
Auto Trait Implementations§
impl Freeze for Squashed
impl RefUnwindSafe for Squashed
impl Send for Squashed
impl Sync for Squashed
impl Unpin for Squashed
impl UnsafeUnpin for Squashed
impl UnwindSafe for Squashed
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