pub struct SpanSet(/* private fields */);Implementations§
Source§impl SpanSet
impl SpanSet
Sourcepub fn with_capacity(capacity: usize) -> Self
pub fn with_capacity(capacity: usize) -> Self
Create a new span set with a predefined capacity
Sourcepub fn insert(&mut self, ins: Span) -> &mut Self
pub fn insert(&mut self, ins: Span) -> &mut Self
insert a new span into the set, coalecing with any that overlap
Sourcepub unsafe fn insert_unchecked(&mut self, ins: Span) -> &mut Self
pub unsafe fn insert_unchecked(&mut self, ins: Span) -> &mut Self
Insert a new span into the set without coalecing
§Safety:
The inner data keeps the invariant that all fields of the inner spans are sorted by all three of their fields by coalecing overlapping spans together. This must be kept by unchecked insertions into the type.
Sourcepub fn red_ctx(&self, ctx: &ParseContext<'_>, c_lines: usize) -> String
pub fn red_ctx(&self, ctx: &ParseContext<'_>, c_lines: usize) -> String
Highlight all the sections in this SpanSet with c_lines padding above and below
Auto Trait Implementations§
impl Freeze for SpanSet
impl RefUnwindSafe for SpanSet
impl Send for SpanSet
impl Sync for SpanSet
impl Unpin for SpanSet
impl UnwindSafe for SpanSet
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