pub fn create_config(
		&self,
		chain_type: &global::ChainTypes,
		wallet_config: Option<WalletConfig>,
		logging_config: Option<LoggingConfig>,
		tor_config: Option<TorConfig>,
		mqs_config: Option<MQSConfig>,
	) -> Result<(), Error> {
		let mut w_lock = self.wallet_inst.lock();
		let lc = w_lock.lc_provider()?;
		lc.create_config(
			chain_type,
			"mimble-wallet.toml",
			wallet_config,
			logging_config,
			tor_config,
			mqs_config,
		)
	}
/// Create a `mimble-wallet.toml` configuration file in the top-level directory for the
/// specified chain type.
/// A custom [`WalletConfig`](../mimble_wallet_config/types/struct.WalletConfig.html)
/// and/or grin `LoggingConfig` may optionally be provided, otherwise defaults will be used.
///
/// Paths in the configuration file will be updated to reflect the top level directory, so
/// path-related values in the optional configuration structs will be ignored.
///
/// # Arguments
///
/// * `chain_type`: The chain type to use in creation of the configuration file. This can be
///     * `AutomatedTesting`
///     * `UserTesting`
///     * `Floonet`
///     * `Mainnet`
///
/// # Returns
/// * Ok if successful
/// * or [`libwallet::Error`](../mimble_wallet_libwallet/struct.Error.html) if an error is encountered.
///
/// # Example
/// Set up as in [`new`](struct.Owner.html#method.new) method above.
/// ```
/// # mimble_wallet_api::doctest_helper_setup_doc_env!(wallet, wallet_config);
///
/// use mimble_core::global::ChainTypes;
///
/// let dir = "path/to/wallet/dir";
///
/// # let dir = tempdir().map_err(|e| format!("{:#?}", e)).unwrap();
/// # let dir = dir
/// #   .path()
/// #   .to_str()
/// #   .ok_or("Failed to convert tmpdir path to string.".to_owned())
/// #   .unwrap();
///
/// let api_owner = Owner::new(wallet.clone(), None, None);
/// let _ = api_owner.set_top_level_directory(dir);
///
/// let result = api_owner.create_config(&ChainTypes::Mainnet, None, None, None, None );
///
/// if let Ok(_) = result {
///    //...
/// }
/// ```
Create a `mimble-wallet.toml` configuration file in the top-level directory for the
specified chain type.
A custom [`WalletConfig`](../mimble_wallet_config/types/struct.WalletConfig.html)
and/or grin `LoggingConfig` may optionally be provided, otherwise defaults will be used.

Paths in the configuration file will be updated to reflect the top level directory, so
path-related values in the optional configuration structs will be ignored.
Create a ` mimble - wallet . toml ` configuration file in the top - level directory for the specified chain type . A custom [ ` WalletConfig ` ] ( .. / mimble_wallet_config / types / struct . WalletConfig . html ) and / or grin ` LoggingConfig ` may optionally be provided otherwise defaults will be used . Paths in the configuration file will be updated to reflect the top level directory so path - related values in the optional configuration structs will be ignored .
pub fn create_config(
		&self,
		chain_type: &global::ChainTypes,
		wallet_config: Option<WalletConfig>,
		logging_config: Option<LoggingConfig>,
		tor_config: Option<TorConfig>,
		mqs_config: Option<MQSConfig>,
	) -> Result<(), Error> {
		let mut w_lock = self.wallet_inst.lock();
		let lc = w_lock.lc_provider()?;
		lc.create_config(
			chain_type,
			"mimble-wallet.toml",
			wallet_config,
			logging_config,
			tor_config,
			mqs_config,
		)
	}
pub fn create_config ( & self , chain_type : & global :: ChainTypes , wallet_config : Option < WalletConfig > , logging_config : Option < LoggingConfig > , tor_config : Option < TorConfig > , mqs_config : Option < MQSConfig > , ) -> Result < ( ) , Error > { let mut w_lock = self . wallet_inst . lock ( ) ; let lc = w_lock . lc_provider ( ) ? ; lc . create_config ( chain_type , " " , wallet_config , logging_config , tor_config , mqs_config , ) }
Create a `mimble-wallet.toml` configuration file in the top-level directory for the
specified chain type.
Create a ` mimble - wallet . toml ` configuration file in the top - level directory for the specified chain type .
&self
chain_type
&global::ChainTypes
wallet_config
Option<WalletConfig>
logging_config
Option<LoggingConfig>
tor_config
Option<TorConfig>
mqs_config
Option<MQSConfig>
Ok if successful
or [`libwallet::Error`](../mimble_wallet_libwallet/struct.Error.html) if an error is encountered.
Ok if successful or [ ` libwallet :: Error ` ] ( .. / mimble_wallet_libwallet / struct . Error . html ) if an error is encountered .
&self
chain_type
&global::ChainTypes
wallet_config
Option<WalletConfig>
logging_config
Option<LoggingConfig>
tor_config
Option<TorConfig>
mqs_config
Option<MQSConfig>
example
Set up as in [`new`](struct.Owner.html#method.new) method above.
Set up as in [ ` new ` ] ( struct . Owner . html#method . new ) method above .
mimble_wallet_api::doctest_helper_setup_doc_env!(wallet, wallet_config);
use mimble_core::global::ChainTypes.

let dir = "path/to/wallet/dir".
use mimble_core :: global :: ChainTypes . let dir = " path / to / wallet / dir " .
let dir = tempdir().map_err(|e| format!("{:#?}", e)).unwrap();
None
let dir = dir
None
.path()
None
.to_str()
None
.ok_or("failed to convert tmpdir path to string.".to_owned())
None
.unwrap();
let api_owner = Owner::new(wallet.clone(), None, None);
let _ = api_owner.set_top_level_directory(dir).




let api_owner = Owner :: new ( wallet . clone () None None ) ; let _ = api_owner . set_top_level_directory ( dir ) .