pub struct NodeSourceSpans { /* private fields */ }Expand description
Mapping from node ref → SourceSpan (byte range in the source document).
Only populated when BufferDocumentOptions::track_source_locations
is enabled.
Implementations§
Source§impl NodeSourceSpans
impl NodeSourceSpans
Sourcepub fn set(&mut self, node_ref: u32, span: SourceSpan)
pub fn set(&mut self, node_ref: u32, span: SourceSpan)
Records (or overwrites) the source span for node_ref.
Sourcepub fn get(&self, node_ref: u32) -> Option<SourceSpan>
pub fn get(&self, node_ref: u32) -> Option<SourceSpan>
Returns the source span for node_ref, if recorded.
Trait Implementations§
Source§impl Debug for NodeSourceSpans
impl Debug for NodeSourceSpans
Source§impl Default for NodeSourceSpans
impl Default for NodeSourceSpans
Source§fn default() -> NodeSourceSpans
fn default() -> NodeSourceSpans
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for NodeSourceSpans
impl RefUnwindSafe for NodeSourceSpans
impl Send for NodeSourceSpans
impl Sync for NodeSourceSpans
impl Unpin for NodeSourceSpans
impl UnsafeUnpin for NodeSourceSpans
impl UnwindSafe for NodeSourceSpans
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