Home
last modified time | relevance | path

Searched refs:cache (Results 1 - 2 of 2) sorted by relevance

/commonlibrary/rust/ylong_json/src/reader/
H A Dio_reader.rs36 cache: Option<Cache>,
39 // A simple cache implementation for `IoReader`.
41 cache: Vec<u8>,
49 cache: Vec::new(), in new()
64 cache: None,
92 if let Some(ref mut cacher) = self.cache { in load()
93 cacher.cache.extend_from_slice(&self.buf[cacher.pre..]); in load()
103 // Every time a user calls a cache-related interface, the cache content
106 if let Some(ref mut cacher) = self.cache { in update_cache()
193 let mut cache = Cache::new(); start_caching() variables
[all...]
H A Dslice_reader.rs28 cache: Option<Cache>, // A cache for storing accumulated characters.
31 // A simple cache implementation for `SliceReader`. We just need to save a
45 cache: None,
107 self.cache = Some(Cache(self.index)); in start_caching()
112 self.cache.as_ref().map(|c| self.index - c.0) in cached_len()
117 self.cache.as_ref().map(|c| &self.slice[c.0..self.index]) in cached_slice()
122 self.cache in cached_data()
129 self.cache = None; in end_caching()
134 self.cache in take_cached_data()
[all...]

Completed in 1 milliseconds