async fn retrieve(&self, token: &String) -> Result<String, PoolErrors> {
        let client = self.pool.get().await?;
        let stmt = client.prepare(SELECT_CREDIT_CARD).await.unwrap();
        let row_result = client.query_one(&stmt, &[&token]).await;
        let mut encrypted_credit_card_json: Vec<u8> = Vec::new();
        if row_result.is_ok() {
           let row = row_result.unwrap();
           encrypted_credit_card_json = row.get("credit_card");
        }
        Ok(self.encryption.decrypt(encrypted_credit_card_json.as_slice()))
    }
/// Get decrypted arbitrary data from the vault by token
/// Arguments:
///     * `token`: the string form of the ID of the data
/// returns:
///     * the decrypted string of data
/// # example
/// ```rust,ignore
/// use data_vault::DataVault;
/// use data_vault::PostgresDataVault;
/// use data_vault::encryption::AesGcmSivEncryption;
/// use data_vault::tokenizer::Blake3Tokenizer;
///
/// let token = String::from("abc123");
/// let cc_string = String::from("{number: 123}");
/// let data_vault = PostgresDataVault::<AesGcmSivEncryption, Blake3Tokenizer>::new().unwrap();
/// data_vault.store(&token, &cc_string).await;
/// let credit_card_string = data_vault.retrieve(&token)
/// ```
Get decrypted arbitrary data from the vault by token
Arguments:
`token`: the string form of the ID of the data
returns:
the decrypted string of data
Get decrypted arbitrary data from the vault by token Arguments : ` token ` : the string form of the ID of the data returns : the decrypted string of data
async fn retrieve(&self, token: &String) -> Result<String, PoolErrors> {
        let client = self.pool.get().await?;
        let stmt = client.prepare(SELECT_CREDIT_CARD).await.unwrap();
        let row_result = client.query_one(&stmt, &[&token]).await;
        let mut encrypted_credit_card_json: Vec<u8> = Vec::new();
        if row_result.is_ok() {
           let row = row_result.unwrap();
           encrypted_credit_card_json = row.get("credit_card");
        }
        Ok(self.encryption.decrypt(encrypted_credit_card_json.as_slice()))
    }
async fn retrieve ( & self , token : & String ) -> Result < String , PoolErrors > { let client = self . pool . get ( ) . await ? ; let stmt = client . prepare ( SELECT_CREDIT_CARD ) . await . unwrap ( ) ; let row_result = client . query_one ( & stmt , & [ & token ] ) . await ; let mut encrypted_credit_card_json : Vec < u8 > = Vec :: new ( ) ; if row_result . is_ok ( ) { let row = row_result . unwrap ( ) ; encrypted_credit_card_json = row . get ( " " ) ; } Ok ( self . encryption . decrypt ( encrypted_credit_card_json . as_slice ( ) ) ) }
Get decrypted arbitrary data from the vault by token
Arguments:
 `token`: the string form of the ID of the data
returns:
 the decrypted string of data
Get decrypted arbitrary data from the vault by token Arguments : ` token ` : the string form of the ID of the data returns : the decrypted string of data
&self
token
&String
&self
token
&String
example


let token = String::from("abc123");
let cc_string = String::from("{number: 123}");
let data_vault = PostgresDataVault::::new().unwrap();
data_vault.store(&token, &cc_string).await;
let credit_card_string = data_vault.retrieve(&token)
```
let token = String :: from ( " abc123 " ) ; let cc_string = String :: from ( " { number : 123 } " ) ; let data_vault = PostgresDataVault :::: new () . unwrap () ; data_vault . store ( &token &cc_string ) . await ; let credit_card_string = data_vault . retrieve ( &token ) ` ` `