Trait move_core_types::resolver::ModuleResolver [−][src]
pub trait ModuleResolver {
type Error: Debug;
fn get_module(&self, id: &ModuleId) -> Result<Option<Vec<u8>>, Self::Error>;
}
Expand description
Traits for resolving Move modules and resources from persistent storage A persistent storage backend that can resolve modules by address + name. Storage backends should return
- Ok(Some(..)) if the data exists
- Ok(None) if the data does not exist
- Err(..) only when something really wrong happens, for example - invariants are broken and observable from the storage side (this is not currently possible as ModuleId and StructTag are always structurally valid) - storage encounters internal error