Struct juniper::parser::SourcePosition [−][src]
pub struct SourcePosition { /* fields omitted */ }A reference to a line and column in an input source file
Methods
impl SourcePosition[src]
impl SourcePositionpub fn index(&self) -> usize[src]
pub fn index(&self) -> usizeThe index of the character in the input source
Zero-based index. Take a substring of the original source starting at
this index to access the item pointed to by this SourcePosition.
pub fn line(&self) -> usize[src]
pub fn line(&self) -> usizeThe line of the character in the input source
Zero-based index: the first line is line zero.
pub fn column(&self) -> usize[src]
pub fn column(&self) -> usizeThe column of the character in the input source
Zero-based index: the first column is column zero.
Trait Implementations
impl Debug for SourcePosition[src]
impl Debug for SourcePositionfn fmt(&self, f: &mut Formatter) -> Result[src]
fn fmt(&self, f: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl Clone for SourcePosition[src]
impl Clone for SourcePositionfn clone(&self) -> SourcePosition[src]
fn clone(&self) -> SourcePositionReturns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
fn clone_from(&mut self, source: &Self)Performs copy-assignment from source. Read more
impl PartialEq for SourcePosition[src]
impl PartialEq for SourcePositionfn eq(&self, other: &SourcePosition) -> bool[src]
fn eq(&self, other: &SourcePosition) -> boolThis method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, other: &SourcePosition) -> bool[src]
fn ne(&self, other: &SourcePosition) -> boolThis method tests for !=.
impl Eq for SourcePosition[src]
impl Eq for SourcePositionimpl PartialOrd for SourcePosition[src]
impl PartialOrd for SourcePositionfn partial_cmp(&self, other: &SourcePosition) -> Option<Ordering>[src]
fn partial_cmp(&self, other: &SourcePosition) -> Option<Ordering>This method returns an ordering between self and other values if one exists. Read more
fn lt(&self, other: &SourcePosition) -> bool[src]
fn lt(&self, other: &SourcePosition) -> boolThis method tests less than (for self and other) and is used by the < operator. Read more
fn le(&self, other: &SourcePosition) -> bool[src]
fn le(&self, other: &SourcePosition) -> boolThis method tests less than or equal to (for self and other) and is used by the <= operator. Read more
fn gt(&self, other: &SourcePosition) -> bool[src]
fn gt(&self, other: &SourcePosition) -> boolThis method tests greater than (for self and other) and is used by the > operator. Read more
fn ge(&self, other: &SourcePosition) -> bool[src]
fn ge(&self, other: &SourcePosition) -> boolThis method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
impl Ord for SourcePosition[src]
impl Ord for SourcePositionfn cmp(&self, other: &SourcePosition) -> Ordering[src]
fn cmp(&self, other: &SourcePosition) -> OrderingThis method returns an Ordering between self and other. Read more
fn max(self, other: Self) -> Self1.21.0[src]
fn max(self, other: Self) -> SelfCompares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self1.21.0[src]
fn min(self, other: Self) -> SelfCompares and returns the minimum of two values. Read more
impl Hash for SourcePosition[src]
impl Hash for SourcePositionfn hash<__H: Hasher>(&self, state: &mut __H)[src]
fn hash<__H: Hasher>(&self, state: &mut __H)Feeds this value into the given [Hasher]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher, 1.3.0[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher, Feeds a slice of this type into the given [Hasher]. Read more
impl Serialize for SourcePosition[src]
impl Serialize for SourcePositionAuto Trait Implementations
impl Send for SourcePosition
impl Send for SourcePositionimpl Sync for SourcePosition
impl Sync for SourcePosition