Skip to main content

PlanContext

Struct PlanContext 

Source
pub struct PlanContext<'a> {
    pub input: &'a NormalizedInput,
    pub step_seq: WireU64,
    pub previous_head: Option<&'a Digest>,
    pub config: &'a ResolvedOperationConfig,
    pub resolving: Option<&'a KernelEffect>,
    pub pending: &'a [KernelEffect],
}
Expand description

What the planner is given. Everything it needs to decide, and nothing that would let it depend on the host’s wall clock or on a default that may drift between binaries: config is the configuration this operation froze in its genesis record.

Fields§

§input: &'a NormalizedInput§step_seq: WireU64§previous_head: Option<&'a Digest>§config: &'a ResolvedOperationConfig§resolving: Option<&'a KernelEffect>

The pending effect a ResolveEffect input answers — the very effect this kernel published, already checked against §15.3 (still pending, kind matches the outcome, not a conflicting duplicate). None for every other input class.

The planner needs it because a failure outcome carries no kind: §7.9’s cross-effect HostEffectFailure is deliberately kind-agnostic, so the one policy decision DEC-5 allows has to be looked up from what the kernel asked for, never from what the host echoed back.

§pending: &'a [KernelEffect]

The effects that stay pending after this input settles the one it answers: the §5k answer of “what does this kernel still have outstanding”. A step that resolves one effect of a multi-effect batch (or that shares its turn with still-running children) must not resume the loop — the provider call it would emit would outrun work the host still owes.

Trait Implementations§

Source§

impl<'a> Debug for PlanContext<'a>

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'a> Freeze for PlanContext<'a>

§

impl<'a> RefUnwindSafe for PlanContext<'a>

§

impl<'a> Send for PlanContext<'a>

§

impl<'a> Sync for PlanContext<'a>

§

impl<'a> Unpin for PlanContext<'a>

§

impl<'a> UnsafeUnpin for PlanContext<'a>

§

impl<'a> UnwindSafe for PlanContext<'a>

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> 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> Same for T

Source§

type Output = T

Should always be Self
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.