pub struct CursorOrderedSink<'a, S> { /* private fields */ }Expand description
This is a CursorSink that buffers cursors and emits them in source order. It uses contiguous coverage tracking to eagerly emit cursors as soon as gaps are filled.
Many CSS grammars allow constructing a tree in arbitrarily authored order, but have a canonical ordering, so for e.g
a function like foo(bar, baz) could be represented as foo(baz, bar) and still be valid. AST nodes output their
cursors in grammar order, which is most often desirable, but this sink will enforce source ordering.
Implementations§
Source§impl<'a, S: CursorSink> CursorOrderedSink<'a, S>
impl<'a, S: CursorSink> CursorOrderedSink<'a, S>
Trait Implementations§
Source§impl<'a, S: CursorSink> CursorSink for CursorOrderedSink<'a, S>
impl<'a, S: CursorSink> CursorSink for CursorOrderedSink<'a, S>
Auto Trait Implementations§
impl<'a, S> Freeze for CursorOrderedSink<'a, S>
impl<'a, S> !RefUnwindSafe for CursorOrderedSink<'a, S>
impl<'a, S> !Send for CursorOrderedSink<'a, S>
impl<'a, S> !Sync for CursorOrderedSink<'a, S>
impl<'a, S> Unpin for CursorOrderedSink<'a, S>
impl<'a, S> !UnwindSafe for CursorOrderedSink<'a, S>
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