Struct gluon_base::pos::Span
[−]
[src]
pub struct Span<Pos> { pub start: Pos, pub end: Pos, pub expansion_id: ExpansionId, }
A span between two locations in a source file
Fields
start: Pos
end: Pos
expansion_id: ExpansionId
Methods
impl<Pos: Ord> Span<Pos>
[src]
fn new(start: Pos, end: Pos) -> Span<Pos>
fn contains(self, other: Span<Pos>) -> bool
fn containment(self, pos: &Pos) -> Ordering
fn containment_exclusive(self, pos: &Pos) -> Ordering
fn merge(self, other: Span<Pos>) -> Option<Span<Pos>>
Trait Implementations
impl<Pos: Copy> Copy for Span<Pos>
[src]
impl<Pos: Clone> Clone for Span<Pos>
[src]
fn clone(&self) -> Span<Pos>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl<Pos: Default> Default for Span<Pos>
[src]
impl<Pos: Eq> Eq for Span<Pos>
[src]
impl<Pos: Debug> Debug for Span<Pos>
[src]
impl<Pos> PartialEq for Span<Pos> where Pos: PartialEq
[src]
fn eq(&self, other: &Span<Pos>) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0
This method tests for !=
.
impl<Pos> PartialOrd for Span<Pos> where Pos: PartialOrd
[src]
fn partial_cmp(&self, other: &Span<Pos>) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, other: &Rhs) -> bool
1.0.0
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, other: &Rhs) -> bool
1.0.0
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn gt(&self, other: &Rhs) -> bool
1.0.0
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, other: &Rhs) -> bool
1.0.0
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more