Trait move_core_types::resolver::ResourceResolver[][src]

pub trait ResourceResolver {
    type Error: Debug;
    fn get_resource(
        &self,
        address: &AccountAddress,
        typ: &StructTag
    ) -> Result<Option<Vec<u8>>, Self::Error>; }
Expand description

A persistent storage backend that can resolve resources by address + type 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

Associated Types

Required methods

Implementations on Foreign Types

Implementors