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
Source§fn eq(&self, other: &SpannedPart) -> bool
fn eq(&self, other: &SpannedPart) -> bool
Tests for
self and other values to be equal, and is used by ==.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