pub(crate) struct PlanInput {
plan: Plan,
started: bool,
ended: bool,
parents: Vec<Option<usize>>,
order: Vec<usize>,
closed: Vec<bool>,
op_ids: HashSet<String>,
call_ids: HashSet<String>,
}Expand description
Owns the growing arena and all input invariants independently of execution.
Fields§
§plan: PlanPlan metadata and node arena populated by complete or incremental input.
started: boolWhether plan initialization is complete, allowing node input after START.
ended: boolWhether input is complete or sealed, so further messages are rejected.
parents: Vec<Option<usize>>Parent arena index for each node; the root has no parent.
order: Vec<usize>Parent-first traversal; wire arena indices are preserved for complete plans.
closed: Vec<bool>Whether each node is closed to new children; leaf nodes are always closed.
op_ids: HashSet<String>Accepted, trimmed operator IDs used to reject duplicate node identities.
call_ids: HashSet<String>Accepted capability call IDs used to reject duplicate calls within the plan.
Implementations§
Source§impl PlanInput
impl PlanInput
pub(crate) fn plan(&self) -> &Plan
pub(crate) fn order(&self) -> &[usize]
pub(crate) fn parent(&self, index: usize) -> Option<usize>
pub(crate) fn is_closed(&self, index: usize) -> bool
pub(crate) fn ended(&self) -> bool
Sourcepub(crate) fn seal(&mut self)
pub(crate) fn seal(&mut self)
Stop admitting input and close every operator when execution is canceled.
Sourcepub(crate) fn from_plan(plan: Plan) -> Result<Self, String>
pub(crate) fn from_plan(plan: Plan) -> Result<Self, String>
Load a complete tree with all operators closed, preserving its original arena indices.
Sourcefn validate_node(&mut self, index: usize, node: &RtdlNode) -> Result<(), String>
fn validate_node(&mut self, index: usize, node: &RtdlNode) -> Result<(), String>
Check shared node constraints, then reserve identities only after all checks pass.
Sourcepub(crate) fn accept(&mut self, msg: ExecuteStreamInput) -> Result<(), String>
pub(crate) fn accept(&mut self, msg: ExecuteStreamInput) -> Result<(), String>
Validate a message before mutating the arena; callers register accepted metadata.
Sourcepub(crate) fn discard_last_node(&mut self)
pub(crate) fn discard_last_node(&mut self)
Roll back an arrival rejected by the runtime’s atomic cancellation/admission check.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PlanInput
impl RefUnwindSafe for PlanInput
impl Send for PlanInput
impl Sync for PlanInput
impl Unpin for PlanInput
impl UnsafeUnpin for PlanInput
impl UnwindSafe for PlanInput
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Layered].