MCPcopy Create free account
hub / github.com/base/base / sync

Method sync

crates/execution/trie/src/cursor_cache.rs:179–194  ·  view source on GitHub ↗

Applies the last cache-served operation to the wrapped cursor.

(&mut self)

Source from the content-addressed store, hash-verified

177impl<C: TrieCursor> CachedTrieCursor<'_, C> {
178 /// Applies the last cache-served operation to the wrapped cursor.
179 fn sync(&mut self) -> Result<(), DatabaseError> {
180 match self.memo.pending.take() {
181 Some(CursorOp::Seek(key)) => {
182 self.inner.seek(key)?;
183 }
184 Some(CursorOp::SeekExact(key)) => {
185 self.inner.seek_exact(key)?;
186 }
187 Some(CursorOp::Next(key)) => {
188 self.inner.seek(key)?;
189 self.inner.next()?;
190 }
191 None => {}
192 }
193 Ok(())
194 }
195}
196
197impl<C: TrieCursor> TrieCursor for CachedTrieCursor<'_, C> {

Callers 2

nextMethod · 0.45
currentMethod · 0.45

Calls 4

takeMethod · 0.45
seekMethod · 0.45
seek_exactMethod · 0.45
nextMethod · 0.45

Tested by

no test coverage detected