accessible_to_cache_item

Function accessible_to_cache_item 

Source
pub async fn accessible_to_cache_item(
    accessible: &AccessibleProxy<'_>,
    cache: Weak<Cache>,
) -> OdiliaResult<CacheItem>
Expand description

Convert an atspi::accessible::AccessibleProxy into a crate::CacheItem. This runs a bunch of long-awaiting code and can take quite some time; use this sparingly. This takes most properties and some function calls through the AccessibleProxy structure and generates a new CacheItem, which will be written to cache before being sent back.

ยงErrors

Will return an Err(_) variant when:

  1. The cache parameter does not reference an active cache once the Weak is upgraded to an Option<Arc<_>>.
  2. Any of the function calls on the accessible fail.
  3. Any (String, OwnedObjectPath) -> AccessiblePrimitive conversions fail. This should never happen, but technically it is possible.