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 SourcePosition
pub fn index(&self) -> usize
[src]
pub fn index(&self) -> usize
The 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) -> usize
The 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) -> usize
The 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 SourcePosition
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Clone for SourcePosition
[src]
impl Clone for SourcePosition
fn clone(&self) -> SourcePosition
[src]
fn clone(&self) -> SourcePosition
Returns 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 SourcePosition
fn eq(&self, other: &SourcePosition) -> bool
[src]
fn eq(&self, other: &SourcePosition) -> bool
This 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) -> bool
This method tests for !=
.
impl Eq for SourcePosition
[src]
impl Eq for SourcePosition
impl PartialOrd for SourcePosition
[src]
impl PartialOrd for SourcePosition
fn 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) -> bool
This 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) -> bool
This 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) -> bool
This 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) -> bool
This 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 SourcePosition
fn cmp(&self, other: &SourcePosition) -> Ordering
[src]
fn cmp(&self, other: &SourcePosition) -> Ordering
This method returns an Ordering
between self
and other
. Read more
fn max(self, other: Self) -> Self
1.21.0[src]
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
1.21.0[src]
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
impl Hash for SourcePosition
[src]
impl Hash for SourcePosition
fn 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 Copy for SourcePosition
[src]
impl Copy for SourcePosition
impl Serialize for SourcePosition
[src]
impl Serialize for SourcePosition
Auto Trait Implementations
impl Send for SourcePosition
impl Send for SourcePosition
impl Sync for SourcePosition
impl Sync for SourcePosition