pub enum Mode {
Lossless,
Lite,
}Expand description
How much of the source the stream carries.
The two modes exist because the consumers genuinely differ. A compiler front end, a formatter or a source-to-source translator must be able to rebuild the input, so they need every byte. Evidence extraction throws trivia away immediately, so carrying it only costs allocations.
Variants§
Lossless
Every byte belongs to a token; the stream rebuilds the source exactly.
Lite
Whitespace and comments are skipped. Positions stay exact, so spans remain usable, but the stream no longer round-trips.
Trait Implementations§
impl Copy for Mode
impl Eq for Mode
impl StructuralPartialEq for Mode
Auto Trait Implementations§
impl Freeze for Mode
impl RefUnwindSafe for Mode
impl Send for Mode
impl Sync for Mode
impl Unpin for Mode
impl UnsafeUnpin for Mode
impl UnwindSafe for Mode
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