MCPcopy Index your code
hub / github.com/diem/move / GetModule

Interface GetModule

language/tools/move-bytecode-utils/src/module_cache.rs:17–22  ·  view source on GitHub ↗

A persistent storage that can fetch the bytecode for a given module id TODO: do we want to implement this in a way that allows clients to cache struct layouts?

Source from the content-addressed store, hash-verified

15/// A persistent storage that can fetch the bytecode for a given module id
16/// TODO: do we want to implement this in a way that allows clients to cache struct layouts?
17pub trait GetModule {
18 type Error: Debug;
19 type Item: Borrow<CompiledModule>;
20
21 fn get_module_by_id(&self, id: &ModuleId) -> Result<Option<Self::Item>, Self::Error>;
22}
23
24/// Simple in-memory module cache
25pub struct ModuleCache<R: ModuleResolver> {

Callers

nothing calls this directly

Implementers 3

module_cache.rslanguage/tools/move-bytecode-utils/src
resolver.rslanguage/tools/move-resource-viewer/sr
on_disk_state_view.rslanguage/tools/move-cli/src/sandbox/ut

Calls

no outgoing calls

Tested by

no test coverage detected