pub(crate) struct PropertiesCache {
values: RwLock<HashMap<String, PropertyValue>>,
caching_result: RwLock<CachingResult>,
}Fields§
§values: RwLock<HashMap<String, PropertyValue>>§caching_result: RwLock<CachingResult>Implementations§
Source§impl PropertiesCache
impl PropertiesCache
fn new( proxy: PropertiesProxy<'static>, interface: InterfaceName<'static>, executor: &Executor<'_>, uncached_properties: HashSet<Str<'static>>, ) -> (Arc<Self>, Task<()>)
Sourceasync fn init(
&self,
proxy: PropertiesProxy<'static>,
interface: InterfaceName<'static>,
uncached_properties: HashSet<Str<'static>>,
) -> Result<(PropertiesChangedStream, InterfaceName<'static>, HashSet<Str<'static>>)>
async fn init( &self, proxy: PropertiesProxy<'static>, interface: InterfaceName<'static>, uncached_properties: HashSet<Str<'static>>, ) -> Result<(PropertiesChangedStream, InterfaceName<'static>, HashSet<Str<'static>>)>
new() runs this in a task it spawns for initialization of properties cache.
Sourceasync fn keep_updated(
&self,
prop_changes: PropertiesChangedStream,
interface: InterfaceName<'static>,
uncached_properties: HashSet<Str<'static>>,
) -> Result<()>
async fn keep_updated( &self, prop_changes: PropertiesChangedStream, interface: InterfaceName<'static>, uncached_properties: HashSet<Str<'static>>, ) -> Result<()>
new() runs this in a task it spawns for keeping the cache in sync.
fn update_cache( &self, uncached_properties: &HashSet<Str<'_>>, changed: &HashMap<&str, Value<'_>>, invalidated: &[&str], interface: &InterfaceName<'_>, )
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for PropertiesCache
impl RefUnwindSafe for PropertiesCache
impl Send for PropertiesCache
impl Sync for PropertiesCache
impl Unpin for PropertiesCache
impl UnwindSafe for PropertiesCache
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