pub struct FragmentAddr {
pub statement: usize,
pub heredoc: usize,
}Expand description
Where one heredoc sits in a planned program: which statement, and which heredoc within it.
The heredoc index is flat across the whole statement — the same
PlannedHeredoc::index the plan publishes — so a heredoc inside a loop
body or an if branch is addressable without walking the structure.
Fields§
§statement: usizeThe statement’s position in the parsed program.
heredoc: usizeThe heredoc’s position within that statement.
Implementations§
Source§impl FragmentAddr
impl FragmentAddr
Sourcepub fn new(statement: usize, heredoc: usize) -> FragmentAddr
pub fn new(statement: usize, heredoc: usize) -> FragmentAddr
Name one fragment.
Trait Implementations§
Source§impl Clone for FragmentAddr
impl Clone for FragmentAddr
Source§fn clone(&self) -> FragmentAddr
fn clone(&self) -> FragmentAddr
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 moreimpl Copy for FragmentAddr
Source§impl Debug for FragmentAddr
impl Debug for FragmentAddr
Source§impl<'de> Deserialize<'de> for FragmentAddr
impl<'de> Deserialize<'de> for FragmentAddr
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<FragmentAddr, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<FragmentAddr, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for FragmentAddr
Source§impl Hash for FragmentAddr
impl Hash for FragmentAddr
Source§impl Ord for FragmentAddr
impl Ord for FragmentAddr
Source§fn cmp(&self, other: &FragmentAddr) -> Ordering
fn cmp(&self, other: &FragmentAddr) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for FragmentAddr
impl PartialEq for FragmentAddr
Source§impl PartialOrd for FragmentAddr
impl PartialOrd for FragmentAddr
Source§impl Serialize for FragmentAddr
impl Serialize for FragmentAddr
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for FragmentAddr
Auto Trait Implementations§
impl Freeze for FragmentAddr
impl RefUnwindSafe for FragmentAddr
impl Send for FragmentAddr
impl Sync for FragmentAddr
impl Unpin for FragmentAddr
impl UnsafeUnpin for FragmentAddr
impl UnwindSafe for FragmentAddr
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<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.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.