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
impl CacheItem
pub fn parent_ref(&mut self) -> OdiliaResult<Arc<RwLock<CacheItem>>>
pub async fn from_atspi_event<T: Signified>( event: &T, cache: Weak<Cache>, connection: &Connection ) -> OdiliaResult<Self>
pub async fn from_atspi_cache_item( atspi_cache_item: CacheItem, cache: Weak<Cache>, connection: &Connection ) -> OdiliaResult<Self>
pub fn get_children(&self) -> OdiliaResult<Vec<Self>>
Trait Implementations§
source§impl Accessible for CacheItem
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,
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,
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,
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,
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,
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,
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,
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,
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,
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,
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,
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,
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,
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,
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,
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,
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,
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<'de> Deserialize<'de> for CacheItem
impl<'de> Deserialize<'de> for CacheItem
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
source§impl Text for CacheItem
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,
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,
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,
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,
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,
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,
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,
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,
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,
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,
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,
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,
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,
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,
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,
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,
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,
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,
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,
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,
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,
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,
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,
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