pub struct CodemapSpans<'a> { /* private fields */ }
Expand description
Codemap span labels temporary storage used to create diagnostic messages.
Implementations§
Source§impl<'a> CodemapSpans<'a>
impl<'a> CodemapSpans<'a>
Sourcepub fn new(codemap_files: &'a mut CodemapFiles) -> Self
pub fn new(codemap_files: &'a mut CodemapFiles) -> Self
Creates a new codemap spans storage.
Sourcepub fn codemap_files(&self) -> &CodemapFiles
pub fn codemap_files(&self) -> &CodemapFiles
Returns codemap files storage.
Sourcepub fn span_labels(&self) -> &[SpanLabel]
pub fn span_labels(&self) -> &[SpanLabel]
Returns a slice of span labels.
Sourcepub fn into_span_labels(self) -> Vec<SpanLabel>
pub fn into_span_labels(self) -> Vec<SpanLabel>
Converts this codemap spans to span labels.
Sourcepub fn span_labels_from<I>(
codemap_files: &'a mut CodemapFiles,
iter: I,
) -> Vec<SpanLabel>where
I: IntoIterator<Item = CMarkSpan<'a>>,
pub fn span_labels_from<I>(
codemap_files: &'a mut CodemapFiles,
iter: I,
) -> Vec<SpanLabel>where
I: IntoIterator<Item = CMarkSpan<'a>>,
Generate span labels from the given codemap files and CMark spans.
Trait Implementations§
Source§impl<'a> Debug for CodemapSpans<'a>
impl<'a> Debug for CodemapSpans<'a>
Source§impl<'a> Extend<CMarkSpan<'a>> for CodemapSpans<'_>
impl<'a> Extend<CMarkSpan<'a>> for CodemapSpans<'_>
Source§fn extend<T: IntoIterator<Item = CMarkSpan<'a>>>(&mut self, iter: T)
fn extend<T: IntoIterator<Item = CMarkSpan<'a>>>(&mut self, iter: T)
Extends a collection with the contents of an iterator. Read more
Source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
🔬This is a nightly-only experimental API. (
extend_one
)Extends a collection with exactly one element.
Source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
🔬This is a nightly-only experimental API. (
extend_one
)Reserves capacity in a collection for the given number of additional elements. Read more
Auto Trait Implementations§
impl<'a> Freeze for CodemapSpans<'a>
impl<'a> RefUnwindSafe for CodemapSpans<'a>
impl<'a> Send for CodemapSpans<'a>
impl<'a> Sync for CodemapSpans<'a>
impl<'a> Unpin for CodemapSpans<'a>
impl<'a> !UnwindSafe for CodemapSpans<'a>
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