Skip to main content

PlanInput

Struct PlanInput 

Source
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: Plan

Plan metadata and node arena populated by complete or incremental input.

§started: bool

Whether plan initialization is complete, allowing node input after START.

§ended: bool

Whether 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

Source

pub(crate) fn plan(&self) -> &Plan

Source

pub(crate) fn order(&self) -> &[usize]

Source

pub(crate) fn parent(&self, index: usize) -> Option<usize>

Source

pub(crate) fn is_closed(&self, index: usize) -> bool

Source

pub(crate) fn ended(&self) -> bool

Source

pub(crate) fn seal(&mut self)

Stop admitting input and close every operator when execution is canceled.

Source

pub(crate) fn from_plan(plan: Plan) -> Result<Self, String>

Load a complete tree with all operators closed, preserving its original arena indices.

Source

fn validate_node(&mut self, index: usize, node: &RtdlNode) -> Result<(), String>

Check shared node constraints, then reserve identities only after all checks pass.

Source

pub(crate) fn accept(&mut self, msg: ExecuteStreamInput) -> Result<(), String>

Validate a message before mutating the arena; callers register accepted metadata.

Source

pub(crate) fn discard_last_node(&mut self)

Roll back an arrival rejected by the runtime’s atomic cancellation/admission check.

Source

fn node(&mut self, msg: ExecuteStreamInput) -> Result<(), String>

Append a child only to an arrived, still-open operator and reject ambiguous identity.

Trait Implementations§

Source§

impl Debug for PlanInput

Source§

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

Formats the value using the given formatter. Read more
Source§

impl Default for PlanInput

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

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

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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.

§

impl<T> IntoRequest<T> for T

§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
§

impl<L> LayerExt<L> for L

§

fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>
where L: Layer<S>,

Applies the layer to a service and wraps it in [Layered].
§

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

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] only if self and other return Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] if either self or other returns Action::Follow. 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, !>

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.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
浙ICP备2023005800号-2 浙公网安备33010902005384号