pub struct MultiSpan { /* fields omitted */ }
A collection of spans. Spans have two orthogonal attributes:
- They can be primary spans. In this case they are the locus of
the error, and would be rendered with
^^^
.
- They can have a label. In this case, the label is written next
to the mark in the snippet when we render.
Selects the first primary span (if any).
Returns all primary spans.
Returns true
if this contains only a dummy primary span with any hygienic context.
Replaces all occurrences of one Span with another. Used to move Span
s in areas that don't
display well (like std macros). Returns true if replacements occurred.
Returns the strings to highlight. We always ensure that there
is an entry for each of the primary spans -- for each primary
span P
, if there is at least one label with span P
, we return
those labels (marked as primary). But otherwise we return
SpanLabel
instances with empty labels.
This method tests for self
and other
values to be equal, and is used by ==
. Read more
This method tests for !=
.
Performs copy-assignment from source
. Read more
Formats the value using the given formatter. Read more
Feeds this value into the given [Hasher
]. Read more
Feeds a slice of this type into the given [Hasher
]. Read more
Creates owned data from borrowed data, usually by cloning. Read more
🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
🔬 This is a nightly-only experimental API. (get_type_id
)
this method will likely be replaced by an associated static
Create an error for a missing method specialization. Defaults to panicking with type, trait & method names. S
is the encoder/decoder state type, T
is the type being encoded/decoded, and the arguments are the names of the trait and method that should've been overridden. Read more