fn delete_storage(&self, id: &str, config: Option<&str>, credentials: Option<&str>) -> Result<(), WalletStorageError> {
        let config = config
            .map(serde_json::from_str::<PostgresConfig>)
            .map_or(Ok(None), |v| v.map(Some))
            .map_err(|err| CommonError::InvalidStructure(format!("Cannot deserialize config: {:?}", err)))?;
        let credentials = credentials
            .map(serde_json::from_str::<PostgresCredentials>)
            .map_or(Ok(None), |v| v.map(Some))
            .map_err(|err| CommonError::InvalidStructure(format!("Cannot deserialize credentials: {:?}", err)))?;

        let config = match config {
            Some(config) => config,
            None => return Err(WalletStorageError::ConfigError)
        };
        let credentials = match credentials {
            Some(credentials) => credentials,
            None => return Err(WalletStorageError::ConfigError)
        };

        let strategy_read_lock = SELECTED_STRATEGY.read().unwrap();
        strategy_read_lock.as_ref().delete_wallet(id, &config, &credentials)
    }
///
/// Deletes the Postgres database file with the provided id from the path specified in the
/// config file.
///
/// # Arguments
///
///  * `id` - the wallet id
///  * `storage_config` - Postgres DB connection config
///  * `storage_credentials` - DB credentials
///
/// # Returns
///
/// Result that can be either:
///
///  * `()`
///  * `WalletStorageError`
///
/// # Errors
///
/// Any of the following `WalletStorageError` type_ of errors can be throw by this method:
///
///  * `WalletStorageError::NotFound` - File with the provided id not found
///  * `IOError(..)` - Deletion of the file form the file-system failed
///
Deletes the Postgres database file with the provided id from the path specified in the
config file.
Deletes the Postgres database file with the provided id from the path specified in the config file .
fn delete_storage(&self, id: &str, config: Option<&str>, credentials: Option<&str>) -> Result<(), WalletStorageError> {
        let config = config
            .map(serde_json::from_str::<PostgresConfig>)
            .map_or(Ok(None), |v| v.map(Some))
            .map_err(|err| CommonError::InvalidStructure(format!("Cannot deserialize config: {:?}", err)))?;
        let credentials = credentials
            .map(serde_json::from_str::<PostgresCredentials>)
            .map_or(Ok(None), |v| v.map(Some))
            .map_err(|err| CommonError::InvalidStructure(format!("Cannot deserialize credentials: {:?}", err)))?;
        let config = match config {
            Some(config) => config,
            None => return Err(WalletStorageError::ConfigError)
        };
        let credentials = match credentials {
            Some(credentials) => credentials,
            None => return Err(WalletStorageError::ConfigError)
        };
        let strategy_read_lock = SELECTED_STRATEGY.read().unwrap();
        strategy_read_lock.as_ref().delete_wallet(id, &config, &credentials)
    }
fn delete_storage ( & self , id : & str , config : Option < & str > , credentials : Option < & str > ) -> Result < ( ) , WalletStorageError > { let config = config . map ( serde_json :: from_str :: < PostgresConfig > ) . map_or ( Ok ( None ) , | v | v . map ( Some ) ) . map_err ( | err | CommonError :: InvalidStructure ( format ! ( " " err ) ) ) ? ; let credentials = credentials . map ( serde_json :: from_str :: < PostgresCredentials > ) . map_or ( Ok ( None ) , | v | v . map ( Some ) ) . map_err ( | err | CommonError :: InvalidStructure ( format ! ( " " err ) ) ) ? ; let config = match config { Some ( config ) => config , None => return Err ( WalletStorageError :: ConfigError ) } ; let credentials = match credentials { Some ( credentials ) => credentials , None => return Err ( WalletStorageError :: ConfigError ) } ; let strategy_read_lock = SELECTED_STRATEGY . read ( ) . unwrap ( ) ; strategy_read_lock . as_ref ( ) . delete_wallet ( id , & config , & credentials ) }
Deletes the Postgres database file with the provided id from the path specified in the
config file.
Deletes the Postgres database file with the provided id from the path specified in the config file .
&self
id
&str
config
Option<&str>
credentials
Option<&str>
Result that can be either.

`()`
`WalletStorageError`
Result that can be either . ` () ` ` WalletStorageError `
&self
id
&str
config
Option<&str>
credentials
Option<&str>
errors
Any of the following `WalletStorageError` type_ of errors can be throw by this method.

`WalletStorageError::NotFound` - File with the provided id not found
`IOError(..)` - Deletion of the file form the file-system failed
Any of the following ` WalletStorageError ` type_ of errors can be throw by this method . ` WalletStorageError :: NotFound ` - File with the provided id not found ` IOError ( .. ) ` - Deletion of the file form the file - system failed