Skip to main content

PlanningElement

Struct PlanningElement 

Source
pub struct PlanningElement {
    pub id: String,
    pub element_type: String,
    pub label: Option<String>,
    pub value: Option<String>,
    pub state: PlanningElementState,
    pub clickable: bool,
    pub settable: bool,
    pub select_options: Option<String>,
}
Expand description

Compressed element representation for the planner.

Strict subset of cel_context::ContextElement — drops bounds, parent_id, full action vectors, source provenance, properties HashMap. Keeps what the planner needs to identify and act on the element. Builders embed only goal-relevant elements (and nearby anchors) to fit the budget.

Fields§

§id: String

Stable element identifier the planner uses in PlannedAction.

§element_type: String

Element kind: “button”, “input”, “link”, “checkbox”, “row”, etc.

§label: Option<String>

Human-readable label or visible text. Optional — labelless elements may still be selected when nearby labels clarify them.

§value: Option<String>

Current value for inputs / selects / cells.

§state: PlanningElementState

State anchors the planner needs to reason about (focused, selected, enabled, checked, expanded). Compact subset of ElementState.

§clickable: bool

Whether this element supports a click-equivalent action.

§settable: bool

Whether this element supports set_value (form fields).

§select_options: Option<String>

For <select> / combobox elements: enumerated option values so the planner can set_value with a real value= attribute instead of guessing slugs. Populated from ContextElement.properties["select_options"] when the source adapter provides it (browser CDP / DOM extractor). Empty / None for everything else.

Format encoded by the browser adapter as "value|Label, value2|Label 2, ..." — strings separated by ", ", each entry split on "|". The planner-side rendering re-parses this; older clients that don’t know the format show the raw string, which is still strictly more useful than the pre-fix behaviour of showing nothing.

Trait Implementations§

Source§

impl Clone for PlanningElement

Source§

fn clone(&self) -> PlanningElement

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

impl Debug for PlanningElement

Source§

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

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

impl<'de> Deserialize<'de> for PlanningElement

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for PlanningElement

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. 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> 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> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

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 = Infallible

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.