pub struct CharPosition {
pub byte_position: usize,
pub char_position: usize,
}
Expand description
The position of a character in a file as both a character index and a byte index of the start of the character.
Fields§
§byte_position: usize
§char_position: usize
Trait Implementations§
Source§impl Clone for CharPosition
impl Clone for CharPosition
Source§fn clone(&self) -> CharPosition
fn clone(&self) -> CharPosition
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for CharPosition
impl Debug for CharPosition
impl Copy for CharPosition
Auto Trait Implementations§
impl Freeze for CharPosition
impl RefUnwindSafe for CharPosition
impl Send for CharPosition
impl Sync for CharPosition
impl Unpin for CharPosition
impl UnwindSafe for CharPosition
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