Struct abstract_os::objects::module::ModuleInfo
source · pub struct ModuleInfo {
pub provider: String,
pub name: String,
pub version: ModuleVersion,
}
Expand description
Stores the provider, name, and version of an Abstract module.
Fields§
§provider: String
Provider of the module
name: String
Name of the contract
version: ModuleVersion
Version of the module
Implementations§
source§impl ModuleInfo
impl ModuleInfo
pub fn from_id(id: &str, version: ModuleVersion) -> AbstractResult<Self>
pub fn from_id_latest(id: &str) -> AbstractResult<Self>
pub fn validate(&self) -> AbstractResult<()>
pub fn id(&self) -> String
pub fn id_with_version(&self) -> String
pub fn assert_version_variant(&self) -> AbstractResult<()>
Trait Implementations§
source§impl Clone for ModuleInfo
impl Clone for ModuleInfo
source§fn clone(&self) -> ModuleInfo
fn clone(&self) -> ModuleInfo
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for ModuleInfo
impl Debug for ModuleInfo
source§impl<'de> Deserialize<'de> for ModuleInfo
impl<'de> Deserialize<'de> for ModuleInfo
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Display for ModuleInfo
impl Display for ModuleInfo
source§impl JsonSchema for ModuleInfo
impl JsonSchema for ModuleInfo
source§fn schema_name() -> String
fn schema_name() -> String
The name of the generated JSON Schema. Read more
source§fn json_schema(gen: &mut SchemaGenerator) -> Schema
fn json_schema(gen: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
Whether JSON Schemas generated for this type should be re-used where possible using the
$ref
keyword. Read moresource§impl KeyDeserialize for &ModuleInfo
impl KeyDeserialize for &ModuleInfo
source§impl PartialEq<ModuleInfo> for ModuleInfo
impl PartialEq<ModuleInfo> for ModuleInfo
source§fn eq(&self, other: &ModuleInfo) -> bool
fn eq(&self, other: &ModuleInfo) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl<'a> Prefixer<'a> for &ModuleInfo
impl<'a> Prefixer<'a> for &ModuleInfo
source§impl<'a> PrimaryKey<'a> for &ModuleInfo
impl<'a> PrimaryKey<'a> for &ModuleInfo
§type Prefix = (String, String)
type Prefix = (String, String)
These associated types need to implement
Prefixer
, so that they can be useful arguments
for prefix()
, sub_prefix()
, and their key-deserializable variants.type SubPrefix = String
type SuperSuffix = (String, String)
fn joined_key(&self) -> Vec<u8, Global>
fn joined_extra_key(&self, key: &[u8]) -> Vec<u8, Global>
source§impl Serialize for ModuleInfo
impl Serialize for ModuleInfo
source§impl TryFrom<ContractVersion> for ModuleInfo
impl TryFrom<ContractVersion> for ModuleInfo
§type Error = AbstractOsError
type Error = AbstractOsError
The type returned in the event of a conversion error.