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?
| 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? |
| 17 | pub 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 |
| 25 | pub struct ModuleCache<R: ModuleResolver> { |
nothing calls this directly
no outgoing calls
no test coverage detected