pub struct AppComponent {
pub name: String,
pub ado_type: String,
pub component_type: ComponentType,
}Fields§
§name: String§ado_type: String§component_type: ComponentTypeImplementations§
Source§impl AppComponent
impl AppComponent
pub fn new( name: impl Into<String>, ado_type: impl Into<String>, instantiate_msg: Binary, ) -> AppComponent
pub fn symlink( name: impl Into<String>, ado_type: impl Into<String>, symlink: impl Into<String>, ) -> AppComponent
pub fn verify(&self, _deps: &Deps<'_>) -> Result<(), ContractError>
pub fn get_salt(&self, _parent_addr: Addr) -> Binary
Sourcepub fn get_new_addr(
&self,
api: &dyn Api,
adodb_addr: &Addr,
querier: &QuerierWrapper<'_>,
parent_addr: Addr,
) -> Result<Option<Addr>, ContractError>
pub fn get_new_addr( &self, api: &dyn Api, adodb_addr: &Addr, querier: &QuerierWrapper<'_>, parent_addr: Addr, ) -> Result<Option<Addr>, ContractError>
Generates an Instantiate2 address for the component.
Returns None for Symlink and CrossChain components.
pub fn get_msg_binary(&self) -> Result<Binary, ContractError>
Sourcepub fn generate_vfs_registration(
&self,
new_addr: Option<Addr>,
_app_addr: &Addr,
app_name: &str,
chain_info: Option<Vec<ChainInfo>>,
_adodb_addr: &Addr,
vfs_addr: &Addr,
) -> Result<Option<SubMsg>, ContractError>
pub fn generate_vfs_registration( &self, new_addr: Option<Addr>, _app_addr: &Addr, app_name: &str, chain_info: Option<Vec<ChainInfo>>, _adodb_addr: &Addr, vfs_addr: &Addr, ) -> Result<Option<SubMsg>, ContractError>
Generates a VFS registration message for the component.
Sourcepub fn generate_instantiation_message(
&self,
querier: &QuerierWrapper<'_>,
adodb_addr: &Addr,
parent_addr: &Addr,
sender: &str,
idx: u64,
) -> Result<Option<SubMsg>, ContractError>
pub fn generate_instantiation_message( &self, querier: &QuerierWrapper<'_>, adodb_addr: &Addr, parent_addr: &Addr, sender: &str, idx: u64, ) -> Result<Option<SubMsg>, ContractError>
Generates an instantiation message for the component.
Returns None for Symlink and CrossChain components.
Sourcepub fn generate_event(&self, addr: Option<Addr>) -> Event
pub fn generate_event(&self, addr: Option<Addr>) -> Event
Generates an event for the app component.
Includes the name and type of the component plus the following for each type:
New- the address of the componentCrossChain- the receiving chain of the componentSymlink- the created symlink for the component
Trait Implementations§
Source§impl Clone for AppComponent
impl Clone for AppComponent
Source§fn clone(&self) -> AppComponent
fn clone(&self) -> AppComponent
Returns a duplicate 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 AppComponent
impl Debug for AppComponent
Source§impl<'de> Deserialize<'de> for AppComponent
impl<'de> Deserialize<'de> for AppComponent
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 AppComponent
impl JsonSchema for AppComponent
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 moreSource§impl PartialEq for AppComponent
impl PartialEq for AppComponent
Source§impl Serialize for AppComponent
impl Serialize for AppComponent
impl StructuralPartialEq for AppComponent
Auto Trait Implementations§
impl Freeze for AppComponent
impl RefUnwindSafe for AppComponent
impl Send for AppComponent
impl Sync for AppComponent
impl Unpin for AppComponent
impl UnwindSafe for AppComponent
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