pub struct WindowFeature {
pub hash: FeatureHash,
pub length: usize,
pub range: ByteRange,
pub block: u32,
pub offset: u32,
}Expand description
One statement window: a fixed-length run of adjacent statements inside one block, hashed from per-statement summaries.
The statements of a block are its direct children selected exactly as
IrNode::statement_summaries selects them: statement shapes plus
Shape::Native children. Each statement contributes its shape tag, its
native kind name (empty for common shapes) and the kind tags of its first
SUMMARY_HEAD_TOKENS tokens — kinds, never texts, so consistent renames
leave the hash unchanged.
Fields§
§hash: FeatureHashHash over the window’s per-statement summaries.
length: usizeWindow length, in statements.
range: ByteRangeBytes from the first through the last statement; reporting only.
block: u32Ordinal of the enclosing block within the unit, in walk order.
Position, never identity: this locates the window so adjacent windows can be folded back into one statement run, and it never enters a hash (AGENTS.md invariant 3).
offset: u32Index of the window’s first statement within its block’s statement
sequence. Position, never identity, as for Self::block.
Trait Implementations§
Source§impl Clone for WindowFeature
impl Clone for WindowFeature
Source§fn clone(&self) -> WindowFeature
fn clone(&self) -> WindowFeature
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for WindowFeature
impl Debug for WindowFeature
impl Eq for WindowFeature
Source§impl PartialEq for WindowFeature
impl PartialEq for WindowFeature
impl StructuralPartialEq for WindowFeature
Auto Trait Implementations§
impl Freeze for WindowFeature
impl RefUnwindSafe for WindowFeature
impl Send for WindowFeature
impl Sync for WindowFeature
impl Unpin for WindowFeature
impl UnsafeUnpin for WindowFeature
impl UnwindSafe for WindowFeature
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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
key and return true if they are equal.