pub struct Position {
pub module_name: String,
/* private fields */
}
Fields§
§module_name: String
Implementations§
Source§impl Position
impl Position
pub fn none() -> Self
pub fn new( pos: usize, span: usize, row: usize, col: usize, module_name: &str, ) -> Self
pub fn set_span(&mut self, span: usize)
pub fn set_pos(&mut self, pos: usize)
pub fn add_span(&mut self, add: usize)
pub fn is_none(&self) -> bool
pub fn get_raw_string(&self, source: &[char]) -> String
pub fn get_row_col(&self, source: &[char]) -> (usize, usize)
Trait Implementations§
Source§impl AddAssign for Position
impl AddAssign for Position
Source§fn add_assign(&mut self, rhs: Self)
fn add_assign(&mut self, rhs: Self)
Performs the
+=
operation. Read moreAuto Trait Implementations§
impl Freeze for Position
impl RefUnwindSafe for Position
impl Send for Position
impl Sync for Position
impl Unpin for Position
impl UnwindSafe for Position
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