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>
[src]
fn with_id(start: Pos, end: Pos, no_expansion: ExpansionId) -> Span<Pos>
[src]
fn contains(self, other: Span<Pos>) -> bool
[src]
fn containment(self, pos: &Pos) -> Ordering
[src]
fn containment_exclusive(self, pos: &Pos) -> Ordering
[src]
fn merge(self, other: Span<Pos>) -> Option<Span<Pos>>
[src]
fn map<Pos2, F>(self, f: F) -> Span<Pos2> where
F: FnMut(Pos) -> Pos2,
[src]
F: FnMut(Pos) -> Pos2,
Trait Implementations
impl<Pos: Copy> Copy for Span<Pos>
[src]
impl<Pos: Clone> Clone for Span<Pos>
[src]
fn clone(&self) -> Span<Pos>
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
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]
Pos: PartialEq,
fn eq(&self, other: &Span<Pos>) -> bool
[src]
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[src]
This method tests for !=
.
impl<Pos> PartialOrd for Span<Pos> where
Pos: PartialOrd,
[src]
Pos: PartialOrd,
fn partial_cmp(&self, other: &Span<Pos>) -> Option<Ordering>
[src]
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
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[src]
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[src]
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[src]
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl<Pos> Ord for Span<Pos> where
Pos: Ord,
[src]
Pos: Ord,
fn cmp(&self, other: &Span<Pos>) -> Ordering
[src]
This method returns an Ordering
between self
and other
. Read more
fn max(self, other: Self) -> Self
1.22.0[src]
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
1.22.0[src]
Compares and returns the minimum of two values. Read more