pub struct Plugin {
pub id: u64,
pub creator: CanonicalAddr,
pub display_name: String,
pub latest_contract_version: String,
pub versions: BTreeMap<String, VersionDetails>,
}Fields§
§id: u64Identifier of the plugin, does not change over time
creator: CanonicalAddrReference Addr onchain to the creator
display_name: StringDisplay name, creator can define this
latest_contract_version: StringLatest cw2 contract version
versions: BTreeMap<String, VersionDetails>Mapping of all versions to the details
Implementations§
Source§impl Plugin
impl Plugin
pub fn get_latest_version_details( &self, ) -> Result<VersionDetails, PluginRegError>
pub fn get_version_details( &self, version: &str, ) -> Result<VersionDetails, PluginRegError>
pub fn new( deps: Deps<'_>, id: u64, creator: String, display_name: String, ipfs_hash: String, latest_contract_version: String, code_id: u64, code_hash: String, ) -> Result<Plugin, PluginRegError>
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Plugin
impl<'de> Deserialize<'de> for Plugin
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 JsonSchema for Plugin
impl JsonSchema for Plugin
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(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &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 moreimpl StructuralPartialEq for Plugin
Auto Trait Implementations§
impl Freeze for Plugin
impl RefUnwindSafe for Plugin
impl Send for Plugin
impl Sync for Plugin
impl Unpin for Plugin
impl UnwindSafe for Plugin
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