pub struct ContextReference {
pub element_type: String,
pub label: Option<String>,
pub ancestor_path: Vec<String>,
pub bounds_region: Option<BoundsRegion>,
pub value_pattern: Option<String>,
}Expand description
A resilient, multi-signal reference to a UI element. Unlike element IDs (which are ephemeral per snapshot), references survive across context snapshots by combining multiple identifying signals.
Fields§
§element_type: StringElement type (button, input, text, etc.) — must match exactly.
label: Option<String>Expected label text (fuzzy matched).
ancestor_path: Vec<String>Ancestor path from root: e.g. [“window:Finder”, “toolbar”, “group”].
bounds_region: Option<BoundsRegion>Coarse spatial region where the element was last seen.
value_pattern: Option<String>Pattern the element’s value should match.
Trait Implementations§
Source§impl Clone for ContextReference
impl Clone for ContextReference
Source§fn clone(&self) -> ContextReference
fn clone(&self) -> ContextReference
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ContextReference
impl Debug for ContextReference
Source§impl<'de> Deserialize<'de> for ContextReference
impl<'de> Deserialize<'de> for ContextReference
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ContextReference
impl RefUnwindSafe for ContextReference
impl Send for ContextReference
impl Sync for ContextReference
impl Unpin for ContextReference
impl UnsafeUnpin for ContextReference
impl UnwindSafe for ContextReference
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
Mutably borrows from an owned value. Read more