Struct mech_core::nodes::SourceRange
source · pub struct SourceRange {
pub start: SourceLocation,
pub end: SourceLocation,
}
Fields§
§start: SourceLocation
§end: SourceLocation
Trait Implementations§
source§impl Clone for SourceRange
impl Clone for SourceRange
source§fn clone(&self) -> SourceRange
fn clone(&self) -> SourceRange
Returns a copy 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 SourceRange
impl Debug for SourceRange
source§impl Default for SourceRange
impl Default for SourceRange
Coordinates in SourceRange are 1-indexed, i.e. they directly translate human’s view to line and column numbers. Having value 0 means the range is not initialized.
source§impl<'de> Deserialize<'de> for SourceRange
impl<'de> Deserialize<'de> for SourceRange
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Hash for SourceRange
impl Hash for SourceRange
source§impl PartialEq for SourceRange
impl PartialEq for SourceRange
source§impl Serialize for SourceRange
impl Serialize for SourceRange
impl Copy for SourceRange
impl Eq for SourceRange
impl StructuralPartialEq for SourceRange
Auto Trait Implementations§
impl Freeze for SourceRange
impl RefUnwindSafe for SourceRange
impl Send for SourceRange
impl Sync for SourceRange
impl Unpin for SourceRange
impl UnwindSafe for SourceRange
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self
from the equivalent element of its
superset. Read moresource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self
is actually part of its subset T
(and can be converted to it).source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset
but without any property checks. Always succeeds.source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self
to the equivalent element of its superset.