Struct hersir::controller::Controller
source · pub struct Controller {
settings: Settings,
working_directory: TestingDirectory,
block0_file: PathBuf,
}
Fields§
§settings: Settings
§working_directory: TestingDirectory
§block0_file: PathBuf
Implementations§
source§impl Controller
impl Controller
pub fn new( settings: Settings, working_directory: TestingDirectory ) -> Result<Self, Error>
pub fn wallet(&mut self, wallet: &str) -> Option<Wallet>
pub fn controlled_wallet(&self, wallet: &str) -> Option<Wallet>
pub fn controlled_wallets(&self) -> Vec<Wallet>
pub fn working_directory(&self) -> &TestingDirectory
pub fn into_persistent(self) -> Self
pub fn block0_file(&self) -> PathBuf
pub fn settings(&self) -> &Settings
pub fn node_config(&self, alias: &str) -> Result<NodeConfig, Error>
pub fn stake_pool(&self, alias: &str) -> Result<&StakePool, Error>
pub fn node_settings(&self, alias: &str) -> Result<&NodeSetting, Error>
pub fn defined_wallets( &self ) -> impl Iterator<Item = (WalletAlias, &WalletSettings)>
pub fn defined_nodes(&self) -> impl Iterator<Item = (&NodeAlias, &NodeSetting)>
pub fn defined_vote_plan(&self, alias: &str) -> Result<VotePlanDef, Error>
pub fn defined_vote_plans(&self) -> Vec<VotePlanDef>
fn convert_to_def(&self, key: &VotePlanKey, vote_plan: &VotePlan) -> VotePlanDef
pub fn spawn_explorer(&mut self) -> Result<ExplorerProcess, Error>
pub fn spawn_node_async( &mut self, alias: &str ) -> Result<JormungandrProcess, Error>
pub fn expect_spawn_failed( &mut self, spawn_params: SpawnParams, expected_msg: &str ) -> Result<(), Error>
pub fn spawn( &mut self, spawn_params: SpawnParams ) -> Result<JormungandrProcess, Error>
pub fn make_starter_for( &mut self, spawn_params: SpawnParams ) -> Result<Starter, Error>
Trait Implementations§
source§impl Clone for Controller
impl Clone for Controller
source§fn clone(&self) -> Controller
fn clone(&self) -> Controller
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 From<MonitorController> for Controller
impl From<MonitorController> for Controller
source§fn from(monitor: MonitorController) -> Self
fn from(monitor: MonitorController) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl RefUnwindSafe for Controller
impl Send for Controller
impl Sync for Controller
impl Unpin for Controller
impl UnwindSafe for Controller
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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