pub struct SpannedPart {
pub part: StringPart,
pub offset: usize,
pub len: usize,
}Expand description
A StringPart together with its byte offset in the original source.
Used by Expr::HereDocBody so the validator and interpreter can attribute
diagnostics to a precise location inside an interpolated heredoc body.
Double-quoted strings continue to use the spanless Expr::Interpolated;
universal spanning is a separate, larger refactor (see plan
make-heredocs-precious-puzzle).
Fields§
§part: StringPartThe part itself.
offset: usizeByte offset of this part in the original source string.
len: usizeByte length of the part’s source representation.
Trait Implementations§
Source§impl Clone for SpannedPart
impl Clone for SpannedPart
Source§fn clone(&self) -> SpannedPart
fn clone(&self) -> SpannedPart
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 SpannedPart
impl Debug for SpannedPart
Source§impl PartialEq for SpannedPart
impl PartialEq for SpannedPart
impl StructuralPartialEq for SpannedPart
Auto Trait Implementations§
impl Freeze for SpannedPart
impl RefUnwindSafe for SpannedPart
impl Send for SpannedPart
impl Sync for SpannedPart
impl Unpin for SpannedPart
impl UnsafeUnpin for SpannedPart
impl UnwindSafe for SpannedPart
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
Source§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
impl<T> OrderedSeq<'_, T> for Twhere
T: Clone,
Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<'p, T> Seq<'p, T> for Twhere
T: Clone,
impl<'p, T> Seq<'p, T> for Twhere
T: Clone,
Source§impl<T, S> SpanWrap<S> for Twhere
S: WrappingSpan<T>,
impl<T, S> SpanWrap<S> for Twhere
S: WrappingSpan<T>,
Source§fn with_span(self, span: S) -> <S as WrappingSpan<Self>>::Spanned
fn with_span(self, span: S) -> <S as WrappingSpan<Self>>::Spanned
Invokes
WrappingSpan::make_wrapped to wrap an AST node in a span.