atspi_client/
cache_ext.rs

1use atspi_proxies::cache::{Cache, CacheBlocking, CacheProxy, CacheProxyBlocking};
2
3impl_extended_errors!(CacheProxy<'_>, CacheExtError);
4impl_extended_errors!(CacheProxyBlocking<'_>, CacheBlockingExtError);
5
6#[allow(clippy::module_name_repetitions)]
7pub trait CacheExtError: Cache {
8	type Error: std::error::Error;
9}
10pub trait CacheBlockingExtError: CacheBlocking {
11	type Error: std::error::Error;
12}
13
14pub trait CacheExt {}
15pub trait CacheBlockingExt {}
16
17impl<T: CacheExtError + Cache> CacheExt for T {}
18impl<T: CacheBlockingExtError + CacheBlocking> CacheBlockingExt for T {}
19
20assert_impl_all!(CacheProxy: Cache, CacheExt);
21assert_impl_all!(CacheProxyBlocking: CacheBlocking, CacheBlockingExt);