pub struct HereDocMeta {
pub delimiter: String,
pub literal: bool,
pub strip_tabs: bool,
pub body: String,
pub body_offset: usize,
}Expand description
How a heredoc was written, carried alongside the redirect so a plan can publish it.
Every field is descriptive, never operative: the redirect’s target
expression is what executes, and this says what the author typed. That
split is why body is here at all — by the time a heredoc reaches the
AST its target has been tab-stripped (literal bodies) or rewritten into
interpolation parts, and neither is the source text an analyzer needs.
Fields§
§delimiter: StringThe delimiter word with quotes removed: PY for <<PY and <<'PY'.
literal: boolWhether the delimiter was quoted, meaning the body does not expand.
strip_tabs: boolWhether the <<- form was used.
body: StringThe body verbatim — no tab stripping, no arithmetic rewriting.
body_offset: usizeByte offset of the body’s first character in the original source.
Trait Implementations§
Source§impl Clone for HereDocMeta
impl Clone for HereDocMeta
Source§fn clone(&self) -> HereDocMeta
fn clone(&self) -> HereDocMeta
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 HereDocMeta
impl Debug for HereDocMeta
Source§impl PartialEq for HereDocMeta
impl PartialEq for HereDocMeta
impl StructuralPartialEq for HereDocMeta
Auto Trait Implementations§
impl Freeze for HereDocMeta
impl RefUnwindSafe for HereDocMeta
impl Send for HereDocMeta
impl Sync for HereDocMeta
impl Unpin for HereDocMeta
impl UnsafeUnpin for HereDocMeta
impl UnwindSafe for HereDocMeta
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.