pub struct InputReference {
pub input_index: usize,
pub position: TextPosition,
pub length: usize,
}Expand description
Reference to an input
Fields§
§input_index: usizeThe input’s index
position: TextPositionThe position in the input
length: usizeThe length in the input
Implementations§
Source§impl InputReference
impl InputReference
pub fn get_line_number_width(&self) -> usize
Sourcepub fn from(input_index: usize, node: &AstNode<'_, '_, '_>) -> InputReference
pub fn from(input_index: usize, node: &AstNode<'_, '_, '_>) -> InputReference
Build a reference from the specifiec input name and AST node
§Panics
Panic if the specified AST node cannot be used to build a position and span in its associated input.
Sourcepub fn overlaps_with(&self, other: &InputReference) -> bool
pub fn overlaps_with(&self, other: &InputReference) -> bool
Checks whether this input reference overlaps with another one
Trait Implementations§
Source§impl Clone for InputReference
impl Clone for InputReference
Source§fn clone(&self) -> InputReference
fn clone(&self) -> InputReference
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 InputReference
impl Debug for InputReference
Source§impl PartialEq for InputReference
impl PartialEq for InputReference
impl Copy for InputReference
impl Eq for InputReference
impl StructuralPartialEq for InputReference
Auto Trait Implementations§
impl Freeze for InputReference
impl RefUnwindSafe for InputReference
impl Send for InputReference
impl Sync for InputReference
impl Unpin for InputReference
impl UnwindSafe for InputReference
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