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§
Source§impl 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§
Source§impl Clone for DebugSymbol
impl Clone for DebugSymbol
Source§fn clone(&self) -> DebugSymbol
fn clone(&self) -> DebugSymbol
Returns a duplicate 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 DebugSymbol
impl Debug for DebugSymbol
Source§impl Hash for DebugSymbol
impl Hash for DebugSymbol
Source§impl PartialEq for DebugSymbol
impl PartialEq for DebugSymbol
impl Copy for DebugSymbol
impl Eq for DebugSymbol
impl StructuralPartialEq for DebugSymbol
Auto Trait Implementations§
impl Freeze for DebugSymbol
impl RefUnwindSafe for DebugSymbol
impl Send for DebugSymbol
impl Sync for DebugSymbol
impl Unpin for DebugSymbol
impl UnwindSafe for DebugSymbol
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