Struct wasm_deploy::file::Config
source · pub struct Config {
pub settings: UserSettings,
pub shell_completion_dir: Option<PathBuf>,
pub chains: Vec<ChainInfo>,
pub envs: Vec<Env>,
pub keys: Vec<SigningKey>,
}Fields§
§settings: UserSettings§shell_completion_dir: Option<PathBuf>§chains: Vec<ChainInfo>§envs: Vec<Env>§keys: Vec<SigningKey>Implementations§
source§impl Config
impl Config
pub fn init(settings: &WorkspaceSettings) -> Result<Config>
pub fn load(settings: &WorkspaceSettings) -> Result<Config>
pub fn save(&self, settings: &WorkspaceSettings) -> Result<()>
pub fn get_active_env(&self) -> Result<&Env, DeployError>
pub fn get_active_env_mut(&mut self) -> Result<&mut Env>
pub fn get_active_chain_info(&self) -> Result<&ChainInfo>
pub async fn get_active_key(&self) -> Result<SigningKey>
pub fn add_chain_from( &mut self, chain_info: ChainInfo ) -> Result<ChainInfo, DeployError>
pub async fn add_chain(&mut self) -> Result<ChainInfo>
sourcepub fn add_contract_from(
&mut self,
new_contract: ContractInfo
) -> Result<ContractInfo>
pub fn add_contract_from( &mut self, new_contract: ContractInfo ) -> Result<ContractInfo>
Adds or replaces a contract
pub fn add_contract(&mut self) -> Result<ContractInfo>
pub fn get_contract_addr(&self, name: &str) -> Result<&String>
pub fn get_contract(&self, name: &str) -> Result<&ContractInfo>
pub fn get_contract_mut(&mut self, name: &str) -> Result<&mut ContractInfo>
pub fn add_key_from( &mut self, key: SigningKey ) -> Result<SigningKey, DeployError>
pub async fn add_key(&mut self) -> Result<SigningKey>
pub fn add_env(&mut self) -> Result<&mut Env>
pub fn change_env(&mut self) -> Result<()>
pub async fn get_rpc_client(&mut self) -> Result<HttpClient>
pub fn get_shell_completion_dir(&self) -> Option<&PathBuf>
pub fn set_shell_completion_dir( &mut self, settings: &WorkspaceSettings ) -> Result<Option<&PathBuf>>
Trait Implementations§
source§impl<'de> Deserialize<'de> for Config
impl<'de> Deserialize<'de> for Config
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
Auto Trait Implementations§
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnwindSafe for Config
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> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request§impl<T> NoneValue for Twhere
T: Default,
impl<T> NoneValue for Twhere T: Default,
type NoneType = T
§fn null_value() -> T
fn null_value() -> T
The none-equivalent value.