pub struct CodeSpan {
pub start: Loc,
pub end: Loc,
pub path: Option<Arc<Path>>,
pub input: Arc<str>,
}
Expand description
A span in a Uiua source file
Fields§
§start: Loc
The starting location
end: Loc
The ending location
path: Option<Arc<Path>>
The path of the file
input: Arc<str>
The text of the input
Implementations§
source§impl CodeSpan
impl CodeSpan
sourcepub fn contains_line_col(&self, line: usize, col: usize) -> bool
pub fn contains_line_col(&self, line: usize, col: usize) -> bool
Check if the span contains a line and column
sourcepub fn just_start(&self) -> Self
pub fn just_start(&self) -> Self
Get just the span of the first character
Trait Implementations§
source§impl Ord for CodeSpan
impl Ord for CodeSpan
source§impl PartialEq for CodeSpan
impl PartialEq for CodeSpan
source§impl PartialOrd for CodeSpan
impl PartialOrd for CodeSpan
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Eq for CodeSpan
Auto Trait Implementations§
impl RefUnwindSafe for CodeSpan
impl Send for CodeSpan
impl Sync for CodeSpan
impl Unpin for CodeSpan
impl UnwindSafe for CodeSpan
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
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more