MCPcopy Create free account
hub / github.com/chyyuu/os_kernel_lab / read

Method read

easy-fs/src/block_cache.rs:55–57  ·  view source on GitHub ↗
(&self, offset: usize, f: impl FnOnce(&T) -> V)

Source from the content-addressed store, hash-verified

53 }
54
55 pub fn read<T, V>(&self, offset: usize, f: impl FnOnce(&T) -> V) -> V {
56 f(self.get_ref(offset))
57 }
58
59 pub fn modify<T, V>(&mut self, offset: usize, f: impl FnOnce(&mut T) -> V) -> V {
60 f(self.get_mut(offset))

Callers 6

openMethod · 0.45
get_block_idMethod · 0.45
read_atMethod · 0.45
read_disk_inodeMethod · 0.45
easy_fs_packFunction · 0.45
efs_testFunction · 0.45

Calls 2

fFunction · 0.50
get_refMethod · 0.45

Tested by 1

efs_testFunction · 0.36