Expand description
Source code offsets.
The Emitter
is generic over an Offset
.
This library comes with two Offset implementations:
NoopOffset
for when you don’t want to track source offsetsusize
for when you do want to track source offsets
To use the latter your reader however has to implement Position<usize>
.
You can easily use any existing reader by wrapping it in the PosTrackingReader
struct
which implements the Position<usize>
trait and takes care of tracking the current position.
Structs§
- Noop
Offset - A zero-sized no-op implementation of
Offset
(for when you don’t want to track offsets). - PosTracking
Reader - Wraps a
Reader
so that it implementsPosition<usize>
.