Trait diem_sdk::move_types::resolver::ModuleResolver
pub trait ModuleResolver {
type Error: Debug;
// Required method
fn get_module(
&self,
id: &ModuleId
) -> Result<Option<Vec<u8, Global>>, 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