pub struct ByteToChar<'a> { /* private fields */ }Expand description
Struct to map byte positions in a UTF-8 string to character positions, for error reporting.
Memory usage is optimized by storing cumulative character counts at 128 byte intervals, which allows for efficient mapping of byte positions to character positions without needing to store a mapping for every single byte.
Implementations§
Source§impl<'a> ByteToChar<'a>
impl<'a> ByteToChar<'a>
Auto Trait Implementations§
impl<'a> Freeze for ByteToChar<'a>
impl<'a> RefUnwindSafe for ByteToChar<'a>
impl<'a> Send for ByteToChar<'a>
impl<'a> Sync for ByteToChar<'a>
impl<'a> Unpin for ByteToChar<'a>
impl<'a> UnsafeUnpin for ByteToChar<'a>
impl<'a> UnwindSafe for ByteToChar<'a>
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