Struct odilia_cache::CacheItem

source ·
pub struct CacheItem {
    pub object: AccessiblePrimitive,
    pub app: AccessiblePrimitive,
    pub parent: CacheRef,
    pub index: i32,
    pub children_num: i32,
    pub interfaces: InterfaceSet,
    pub role: Role,
    pub states: StateSet,
    pub text: String,
    pub children: Vec<CacheRef>,
    pub cache: Weak<Cache>,
}
Expand description

A struct representing an accessible. To get any information from the cache other than the stored information like role, interfaces, and states, you will need to instantiate an atspi::accessible::AccessibleProxy or other *Proxy type from atspi to query further info.

Fields§

§object: AccessiblePrimitive§app: AccessiblePrimitive§parent: CacheRef§index: i32§children_num: i32§interfaces: InterfaceSet§role: Role§states: StateSet§text: String§children: Vec<CacheRef>§cache: Weak<Cache>

Implementations§

source§

impl CacheItem

source

pub fn parent_ref(&mut self) -> OdiliaResult<Arc<RwLock<CacheItem>>>

source

pub async fn from_atspi_event<T: Signified>( event: &T, cache: Weak<Cache>, connection: &Connection ) -> OdiliaResult<Self>

source

pub async fn from_atspi_cache_item( atspi_cache_item: CacheItem, cache: Weak<Cache>, connection: &Connection ) -> OdiliaResult<Self>

source

pub fn get_children(&self) -> OdiliaResult<Vec<Self>>

Trait Implementations§

source§

impl Accessible for CacheItem

§

type Error = OdiliaError

source§

fn get_application<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = Result<Self, Self::Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

GetApplication method
source§

fn parent<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = Result<Self, Self::Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

Parent property
source§

fn get_children<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = Result<Vec<Self>, Self::Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

GetChildren method
source§

fn child_count<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = Result<i32, Self::Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

ChildCount property
source§

fn get_index_in_parent<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = Result<i32, Self::Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

GetIndexInParent method; this will give an index between 0 and n, where n is the number of children in the parent.
source§

fn get_role<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = Result<Role, Self::Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

GetRole method
source§

fn get_interfaces<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = Result<InterfaceSet, Self::Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

GetInterfaces method
source§

fn get_attributes<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = Result<HashMap<String, String>, Self::Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

GetAttributes method
source§

fn name<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = Result<String, Self::Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

Name property
source§

fn locale<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = Result<String, Self::Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

Locale property
source§

fn description<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = Result<String, Self::Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

Description property
source§

fn get_relation_set<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = Result<Vec<(RelationType, Vec<Self>)>, Self::Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

GetRelationSet method
source§

fn get_role_name<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = Result<String, Self::Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

GetRoleName method
source§

fn get_state<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = Result<StateSet, Self::Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

GetState method
source§

fn get_child_at_index<'life0, 'async_trait>( &'life0 self, idx: i32 ) -> Pin<Box<dyn Future<Output = Result<Self, Self::Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

GetChildAtIndex method
source§

fn get_localized_role_name<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = Result<String, Self::Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

GetLocalizedRoleName method
source§

fn accessible_id<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = Result<AccessibleId, Self::Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

AccessibleId property
source§

impl Clone for CacheItem

source§

fn clone(&self) -> CacheItem

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for CacheItem

source§

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

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

impl<'de> Deserialize<'de> for CacheItem

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 CacheItem

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

impl Text for CacheItem

§

type Error = OdiliaError

source§

fn add_selection<'life0, 'async_trait>( &'life0 self, start_offset: i32, end_offset: i32 ) -> Pin<Box<dyn Future<Output = Result<bool, Self::Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

AddSelection method
source§

fn get_attribute_run<'life0, 'async_trait>( &'life0 self, offset: i32, include_defaults: bool ) -> Pin<Box<dyn Future<Output = Result<(HashMap<String, String>, i32, i32), Self::Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

GetAttributeRun method
source§

fn get_attribute_value<'life0, 'life1, 'async_trait>( &'life0 self, offset: i32, attribute_name: &'life1 str ) -> Pin<Box<dyn Future<Output = Result<String, Self::Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

GetAttributeValue method
source§

fn get_attributes<'life0, 'async_trait>( &'life0 self, offset: i32 ) -> Pin<Box<dyn Future<Output = Result<(HashMap<String, String>, i32, i32), Self::Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

GetAttributes method
source§

fn get_bounded_ranges<'life0, 'async_trait>( &'life0 self, x: i32, y: i32, width: i32, height: i32, coord_type: CoordType, x_clip_type: ClipType, y_clip_type: ClipType ) -> Pin<Box<dyn Future<Output = Result<Vec<(i32, i32, String, OwnedValue)>, Self::Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

GetBoundedRanges method
source§

fn get_character_at_offset<'life0, 'async_trait>( &'life0 self, offset: i32 ) -> Pin<Box<dyn Future<Output = Result<i32, Self::Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

GetCharacterAtOffset method
source§

fn get_character_extents<'life0, 'async_trait>( &'life0 self, offset: i32, coord_type: CoordType ) -> Pin<Box<dyn Future<Output = Result<(i32, i32, i32, i32), Self::Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

GetCharacterExtents method
source§

fn get_default_attribute_set<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = Result<HashMap<String, String>, Self::Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

GetDefaultAttributeSet method
source§

fn get_default_attributes<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = Result<HashMap<String, String>, Self::Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

GetDefaultAttributes method
source§

fn get_nselections<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = Result<i32, Self::Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

GetNSelections method
source§

fn get_offset_at_point<'life0, 'async_trait>( &'life0 self, x: i32, y: i32, coord_type: CoordType ) -> Pin<Box<dyn Future<Output = Result<i32, Self::Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

GetOffsetAtPoint method
source§

fn get_range_extents<'life0, 'async_trait>( &'life0 self, start_offset: i32, end_offset: i32, coord_type: CoordType ) -> Pin<Box<dyn Future<Output = Result<(i32, i32, i32, i32), Self::Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

GetRangeExtents method
source§

fn get_selection<'life0, 'async_trait>( &'life0 self, selection_num: i32 ) -> Pin<Box<dyn Future<Output = Result<(i32, i32), Self::Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

GetSelection method
source§

fn get_string_at_offset<'life0, 'async_trait>( &'life0 self, offset: i32, granularity: Granularity ) -> Pin<Box<dyn Future<Output = Result<(String, i32, i32), Self::Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

GetStringAtOffset method
source§

fn get_text<'life0, 'async_trait>( &'life0 self, start_offset: i32, end_offset: i32 ) -> Pin<Box<dyn Future<Output = Result<String, Self::Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

GetText method
source§

fn get_text_after_offset<'life0, 'async_trait>( &'life0 self, offset: i32, type_: u32 ) -> Pin<Box<dyn Future<Output = Result<(String, i32, i32), Self::Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

GetTextAfterOffset method
source§

fn get_text_at_offset<'life0, 'async_trait>( &'life0 self, offset: i32, type_: u32 ) -> Pin<Box<dyn Future<Output = Result<(String, i32, i32), Self::Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

GetTextAtOffset method
source§

fn get_text_before_offset<'life0, 'async_trait>( &'life0 self, offset: i32, type_: u32 ) -> Pin<Box<dyn Future<Output = Result<(String, i32, i32), Self::Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

GetTextBeforeOffset method
source§

fn remove_selection<'life0, 'async_trait>( &'life0 self, selection_num: i32 ) -> Pin<Box<dyn Future<Output = Result<bool, Self::Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

RemoveSelection method
source§

fn scroll_substring_to<'life0, 'async_trait>( &'life0 self, start_offset: i32, end_offset: i32, type_: u32 ) -> Pin<Box<dyn Future<Output = Result<bool, Self::Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

ScrollSubstringTo method
source§

fn scroll_substring_to_point<'life0, 'async_trait>( &'life0 self, start_offset: i32, end_offset: i32, type_: u32, x: i32, y: i32 ) -> Pin<Box<dyn Future<Output = Result<bool, Self::Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

ScrollSubstringToPoint method
source§

fn set_caret_offset<'life0, 'async_trait>( &'life0 self, offset: i32 ) -> Pin<Box<dyn Future<Output = Result<bool, Self::Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

SetCaretOffset method
source§

fn set_selection<'life0, 'async_trait>( &'life0 self, selection_num: i32, start_offset: i32, end_offset: i32 ) -> Pin<Box<dyn Future<Output = Result<bool, Self::Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

SetSelection method
source§

fn caret_offset<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = Result<i32, Self::Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

CaretOffset property
source§

fn character_count<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = Result<i32, Self::Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

CharacterCount property

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

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

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

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 Twhere U: From<T>,

const: unstable · 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<T> for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for Twhere T: Clone,

§

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 Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
const: unstable · source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for Twhere V: MultiLane<T>,

§

fn vzip(self) -> V

source§

impl<T> WithSubscriber for T

source§

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

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

impl<T> DeserializeOwned for Twhere T: for<'de> Deserialize<'de>,