pub struct DebugSymbol { /* private fields */ }Expand description
When provided along with the source text, identifies a span of source code.
Because they are passed around everywhere, the debug symbols used by Sphinx are very light weight.
Just an index into the source text and a length. In order to be useful they must first be resolved
using a DebugSymbolResolver.
Implementations
sourceimpl DebugSymbol
impl DebugSymbol
pub fn new(start: TokenIndex, length: TokenLength) -> Self
pub fn start(&self) -> TokenIndex
pub fn end(&self) -> TokenIndex
pub fn len(&self) -> TokenLength
pub fn is_empty(&self) -> bool
Trait Implementations
sourceimpl Clone for DebugSymbol
impl Clone for DebugSymbol
sourcefn clone(&self) -> DebugSymbol
fn clone(&self) -> DebugSymbol
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
sourceimpl Debug for DebugSymbol
impl Debug for DebugSymbol
sourceimpl Hash for DebugSymbol
impl Hash for DebugSymbol
sourceimpl PartialEq<DebugSymbol> for DebugSymbol
impl PartialEq<DebugSymbol> for DebugSymbol
sourcefn eq(&self, other: &DebugSymbol) -> bool
fn eq(&self, other: &DebugSymbol) -> bool
This method tests for self and other values to be equal, and is used
by ==. Read more
sourcefn ne(&self, other: &DebugSymbol) -> bool
fn ne(&self, other: &DebugSymbol) -> bool
This method tests for !=.
impl Copy for DebugSymbol
impl Eq for DebugSymbol
impl StructuralEq for DebugSymbol
impl StructuralPartialEq for DebugSymbol
Auto Trait Implementations
impl RefUnwindSafe for DebugSymbol
impl Send for DebugSymbol
impl Sync for DebugSymbol
impl Unpin for DebugSymbol
impl UnwindSafe for DebugSymbol
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> CallHasher for T where
T: Hash + ?Sized,
impl<T> CallHasher for T where
T: Hash + ?Sized,
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more