Skip to main content

SpanSource

Enum SpanSource 

pub enum SpanSource {
    Slot(u32),
    MetaRef(u32),
    Known(Pos),
    SelfBase,
}
Expand description

One candidate in a pending endpoint walk, in lark’s _pp_get_meta order.

Variants§

§

Slot(u32)

An unfilled batching-callback slot: classify the drained host value at resolution (positioned/positionless Token or stamped Tree contribute; anything else skips).

§

MetaRef(u32)

A tree child whose own meta is unresolved — an index into the same meta arena the owning Meta::Pending lives in.

§

Known(Pos)

Engine-resolved contributor; terminates the walk (later raw children cannot be reached by lark’s scan).

§

SelfBase

The owning node’s OWN prior meta — an expand1 (?rule) collapse whose scan walked over the very node it is about to stamp (lark wraps PropagatePositions outside ExpandSingleChild, so res_meta is first_meta). Resolves against the pending meta’s base, NOT the meta arena: the arena slot is mid-overwrite, and reading it would look like a dependency cycle.

Keeping it as a source — rather than deleting it — is what makes the WALK faithful: a non-empty base CONTRIBUTES and terminates the walk (lark stops at that child and self-assigns), while an empty base SKIPS and the walk continues to later raw children. Deleting it always continued, which silently took the endpoint from a later child lark can never reach.

Scope of “faithful”: this models lark’s _pp_get_meta WALK, not the mutation ORDER of PropagatePositions.__call__, which applies the start update before scanning the reversed children — so lark can observe (and, on an empty base, crash on) a half-written res_meta. Both plans here resolve against the same base. The only observable difference is that lark raises AttributeError where we return the value its own algorithm prescribes; deliberately not emulated (see dev/post-milestone-1.md).

Trait Implementations§

§

impl Clone for SpanSource

§

fn clone(&self) -> SpanSource

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Debug for SpanSource

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
§

impl Eq for SpanSource

§

impl PartialEq for SpanSource

§

fn eq(&self, other: &SpanSource) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
§

impl StructuralPartialEq for SpanSource

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.