pub struct ModuleInfo {
pub namespace: Namespace,
pub name: String,
pub version: ModuleVersion,
}
Expand description
Stores the namespace, name, and version of an Abstract module.
Fields§
§namespace: Namespace
Namespace 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 schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. 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§const KEY_ELEMS: u16 = 3u16
const KEY_ELEMS: u16 = 3u16
The number of key elements is used for the deserialization of compound keys.
It should be equal to PrimaryKey::key().len()
type Output = ModuleInfo
fn from_vec(value: Vec<u8>) -> StdResult<Self::Output>
fn from_slice(value: &[u8]) -> Result<Self::Output, StdError>
Source§impl PartialEq for ModuleInfo
impl PartialEq for ModuleInfo
Source§impl Prefixer<'_> for &ModuleInfo
impl Prefixer<'_> for &ModuleInfo
Source§impl PrimaryKey<'_> for &ModuleInfo
impl PrimaryKey<'_> for &ModuleInfo
Source§type Suffix = ModuleVersion
type Suffix = ModuleVersion
version
type SuperSuffix = (String, ModuleVersion)
fn joined_key(&self) -> Vec<u8>
fn joined_extra_key(&self, key: &[u8]) -> Vec<u8>
Source§impl Serialize for ModuleInfo
impl Serialize for ModuleInfo
Source§impl TryFrom<ContractVersion> for ModuleInfo
impl TryFrom<ContractVersion> for ModuleInfo
Source§type Error = AbstractError
type Error = AbstractError
The type returned in the event of a conversion error.
Source§impl TryFrom<ModuleInfo> for ContractVersion
impl TryFrom<ModuleInfo> for ContractVersion
Source§type Error = AbstractError
type Error = AbstractError
The type returned in the event of a conversion error.
impl StructuralPartialEq for ModuleInfo
Auto Trait Implementations§
impl Freeze for ModuleInfo
impl RefUnwindSafe for ModuleInfo
impl Send for ModuleInfo
impl Sync for ModuleInfo
impl Unpin for ModuleInfo
impl UnwindSafe for ModuleInfo
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more