text
stringlengths
70
351k
source
stringclasses
4 values
<|fim_prefix|> // file: hyperswitch-card-vault/src/crypto/encryption_manager/managers/aes.rs | crate: src use crate::{ crypto::encryption_manager::encryption_interface::Encryption, error::{self, ContainerError}, }; use error_stack::ResultExt; use ring::aead::{self, BoundKey}; fn decrypt(&self, input: Vec<u8>) -...
ast_fragments
<|fim_prefix|> // file: hyperswitch-card-vault/src/crypto/encryption_manager/managers/aes.rs | crate: src use crate::{ crypto::encryption_manager::encryption_interface::Encryption, error::{self, ContainerError}, }; use ring::aead::{self, BoundKey}; fn encrypt(&self, mut input: Vec<u8>) -> Self::ReturnType<'_, V...
ast_fragments
<|fim_prefix|> // file: hyperswitch-card-vault/src/crypto/encryption_manager/managers/aes.rs | crate: src use crate::{ crypto::encryption_manager::encryption_interface::Encryption, error::{self, ContainerError}, }; use ring::aead::{self, BoundKey}; fn advance(&mut self) -> Result<ring::aead::Nonce, ring::error:...
ast_fragments
<|fim_prefix|> // file: hyperswitch-card-vault/src/crypto/encryption_manager/managers/aes.rs | crate: src use ring::aead::{self, BoundKey}; /// Constructs a nonce sequence from bytes fn from_bytes(bytes: [u8; ring::aead::NONCE_LEN]) -> Self { <|fim_suffix|> <|fim_middle|> }
ast_fragments
// file: hyperswitch-card-vault/src/crypto/encryption_manager/managers/aes.rs | crate: src use crate::{ crypto::encryption_manager::encryption_interface::Encryption, error::{self, ContainerError}, }; use ring::aead::{self, BoundKey}; /// Returns the current nonce value as bytes. fn current(&self) -> [u8; ri...
ast_fragments
<|fim_prefix|> // file: hyperswitch-card-vault/src/crypto/encryption_manager/managers/aes.rs | crate: src pub fn new(key: Vec<u8>) -> Self { {<|fim_suffix|> <|fim_middle|> }}
ast_fragments
<|fim_prefix|> // file: hyperswitch-card-vault/src/crypto/keymanager/external_keymanager.rs | crate: src use crate::{ api_client::{ApiResponse, Method}, app::TenantAppState, crypto::keymanager::{ external_keymanager::{ self, types::{ DataDecryptionRequest, Dat...
ast_fragments
<|fim_prefix|> // file: hyperswitch-card-vault/src/crypto/keymanager/external_keymanager.rs | crate: src use crate::{ api_client::{ApiResponse, Method}, app::TenantAppState, crypto::keymanager::{ external_keymanager::{ self, types::{ DataDecryptionRequest, Dat...
ast_fragments
<|fim_prefix|> // file: hyperswitch-card-vault/src/crypto/keymanager/external_keymanager.rs | crate: src use crate::{ api_client::{ApiResponse, Method}, app::TenantAppState, crypto::keymanager::{ external_keymanager::{ self, types::{ DataDecryptionRequest, Dat...
ast_fragments
<|fim_prefix|> // file: hyperswitch-card-vault/src/crypto/keymanager/external_keymanager.rs | crate: src use crate::{ api_client::{ApiResponse, Method}, app::TenantAppState, crypto::keymanager::{ external_keymanager::{ self, types::{ DataDecryptionRequest, Dat...
ast_fragments
<|fim_prefix|> // file: hyperswitch-card-vault/src/crypto/keymanager/external_keymanager.rs | crate: src use crate::{ api_client::{ApiResponse, Method}, app::TenantAppState, crypto::keymanager::{ external_keymanager::{ self, types::{ DataDecryptionRequest, Dat...
ast_fragments
<|fim_prefix|> // file: hyperswitch-card-vault/src/crypto/keymanager/external_keymanager.rs | crate: src use crate::{ api_client::{ApiResponse, Method}, app::TenantAppState, crypto::keymanager::{ external_keymanager::{ self, types::{ DataDecryptionRequest, Dat...
ast_fragments
<|fim_prefix|> // file: hyperswitch-card-vault/src/crypto/keymanager/external_keymanager.rs | crate: src use crate::{ api_client::{ApiResponse, Method}, app::TenantAppState, crypto::keymanager::{ external_keymanager::{ self, types::{ DataDecryptionRequest, Dat...
ast_fragments
<|fim_prefix|> // file: hyperswitch-card-vault/src/crypto/keymanager/external_keymanager.rs | crate: src use crate::{ api_client::{ApiResponse, Method}, app::TenantAppState, crypto::keymanager::{ external_keymanager::{ self, types::{ DataDecryptionRequest, Dat...
ast_fragments
// file: hyperswitch-card-vault/src/crypto/keymanager/external_keymanager.rs | crate: src use crate::{ api_client::{ApiResponse, Method}, app::TenantAppState, crypto::keymanager::{ external_keymanager::{ self, types::{ DataDecryptionRequest, DataDecryptionResp...
ast_fragments
<|fim_prefix|> // file: hyperswitch-card-vault/src/crypto/keymanager/external_keymanager.rs | crate: src use crate::{ api_client::{ApiResponse, Method}, app::TenantAppState, crypto::keymanager::{ external_keymanager::{ self, types::{ DataDecryptionRequest, Dat...
ast_fragments
<|fim_prefix|> // file: hyperswitch-card-vault/src/crypto/keymanager/external_keymanager.rs | crate: src use crate::{ api_client::{ApiResponse, Method}, app::TenantAppState, crypto::keymanager::{ external_keymanager::{ self, types::{ DataDecryptionRequest, Dat...
ast_fragments
<|fim_prefix|> // file: hyperswitch-card-vault/src/crypto/keymanager/external_keymanager.rs | crate: src use crate::{ api_client::{ApiResponse, Method}, app::TenantAppState, crypto::keymanager::{ external_keymanager::{ self, types::{ DataDecryptionRequest, Dat...
ast_fragments
// file: hyperswitch-card-vault/src/crypto/keymanager/external_keymanager.rs | crate: src use crate::{ api_client::{ApiResponse, Method}, app::TenantAppState, crypto::keymanager::{ external_keymanager::{ self, types::{ DataDecryptionRequest, DataDecryptionResp...
ast_fragments
<|fim_prefix|> // file: hyperswitch-card-vault/src/crypto/keymanager/external_keymanager/utils.rs | crate: src use std::collections::HashSet; use hyper::header::{AUTHORIZATION, CONTENT_TYPE}; use masking::{Mask, Maskable}; use crate::storage::consts::X_TENANT_ID; use crate::{app::TenantAppState, crypto::consts::BASE64_...
ast_fragments
// file: hyperswitch-card-vault/src/crypto/keymanager/external_keymanager/utils.rs | crate: src use std::collections::HashSet; use hyper::header::{AUTHORIZATION, CONTENT_TYPE}; use masking::{Mask, Maskable}; use crate::storage::consts::X_TENANT_ID; use crate::{app::TenantAppState, crypto::consts::BASE64_ENGINE}; pub fn...
ast_fragments
<|fim_prefix|> // file: hyperswitch-card-vault/src/logger/formatter.rs | crate: src use std::{ collections::{HashMap, HashSet}, fmt, io::Write, }; use serde::ser::{SerializeMap, Serializer}; use serde_json::Value; use super::storage::Storage; use time::format_description::well_known::Iso8601; use tracing::{...
ast_fragments
<|fim_prefix|> // file: hyperswitch-card-vault/src/logger/formatter.rs | crate: src use std::{ collections::{HashMap, HashSet}, fmt, io::Write, }; use serde_json::Value; /// Construct of `FormattingLayer with implicit default entries. pub fn new_with_implicit_entries( service: &str, dst_...
ast_fragments
<|fim_prefix|> // file: hyperswitch-card-vault/src/logger/formatter.rs | crate: src use std::{ collections::{HashMap, HashSet}, fmt, io::Write, }; /// A `name` will be attached to all records during formatting. /// A `dst_writer` to forward all records. /// /// ## Example /// ```rust,ign...
ast_fragments
// file: hyperswitch-card-vault/src/logger/formatter.rs | crate: src use tracing::{Event, Metadata, Subscriber}; use tracing_subscriber::{ fmt::MakeWriter, layer::Context, registry::{LookupSpan, SpanRef}, Layer, }; fn on_close(&self, id: tracing::Id, ctx: Context<'_, S>) { let span = ctx.span(&i...
ast_fragments
// file: hyperswitch-card-vault/src/logger/formatter.rs | crate: src use std::{ collections::{HashMap, HashSet}, fmt, io::Write, }; use serde::ser::{SerializeMap, Serializer}; use serde_json::Value; use super::storage::Storage; use tracing::{Event, Metadata, Subscriber}; use tracing_subscriber::{ fmt::M...
ast_fragments
// file: hyperswitch-card-vault/src/logger/formatter.rs | crate: src use std::{ collections::{HashMap, HashSet}, fmt, io::Write, }; /// /// Flush memory buffer into an output stream trailing it with next line. /// /// Should be done by single `write_all` call to avoid fragmentation of log be...
ast_fragments
<|fim_prefix|> // file: hyperswitch-card-vault/src/logger/formatter.rs | crate: src use std::{ collections::{HashMap, HashSet}, fmt, io::Write, }; /// /// Constructor of `FormattingLayer`. /// /// A `name` will be attached to all records during formatting. /// A `dst_writer` to forward a...
ast_fragments
<|fim_prefix|> // file: hyperswitch-card-vault/src/logger/formatter.rs | crate: src use std::{ collections::{HashMap, HashSet}, fmt, io::Write, }; use tracing::{Event, Metadata, Subscriber}; use tracing_subscriber::{ fmt::MakeWriter, layer::Context, registry::{LookupSpan, SpanRef}, Layer, };...
ast_fragments
// file: hyperswitch-card-vault/src/logger/setup.rs | crate: src use tracing_appender::non_blocking::WorkerGuard; use tracing_subscriber::{fmt, prelude::*, util::SubscriberInitExt, EnvFilter, Layer}; use super::{config, formatter::FormattingLayer, storage::StorageSubscription}; /// Setup logging sub-system specifying t...
ast_fragments
<|fim_prefix|> // file: hyperswitch-card-vault/src/logger/setup.rs | crate: src use tracing_appender::non_blocking::WorkerGuard; use tracing_subscriber::{fmt, prelude::*, util::SubscriberInitExt, EnvFilter, Layer}; use super::{config, formatter::FormattingLayer, storage::StorageSubscription}; /// Setup logging sub-syst...
ast_fragments
<|fim_prefix|> // file: hyperswitch-card-vault/src/storage/types.rs | crate: src use crate::{ crypto::encryption_manager::{encryption_interface::Encryption, managers::aes::GcmAes256}, error, routes::data::types::{StoreCardRequest, Validation}, }; use super::schema; pub fn new(request: StoreCardRequest, hash...
ast_fragments
<|fim_prefix|> // file: hyperswitch-card-vault/src/storage/types.rs | crate: src use diesel::{ backend::Backend, deserialize::{self, FromSql}, serialize::ToSql, sql_types, AsExpression, Identifiable, Insertable, Queryable, }; use masking::{ExposeInterface, PeekInterface, Secret, StrongSecret}; pub fn ge...
ast_fragments
<|fim_prefix|> // file: hyperswitch-card-vault/src/storage/types.rs | crate: src use diesel::{ backend::Backend, deserialize::{self, FromSql}, serialize::ToSql, sql_types, AsExpression, Identifiable, Insertable, Queryable, }; use crate::{ crypto::encryption_manager::{encryption_interface::Encryption...
ast_fragments
<|fim_prefix|> // file: hyperswitch-card-vault/src/storage/types.rs | crate: src use diesel::{ backend::Backend, deserialize::{self, FromSql}, serialize::ToSql, sql_types, AsExpression, Identifiable, Insertable, Queryable, }; use crate::{ crypto::encryption_manager::{encryption_interface::Encryption...
ast_fragments
// file: hyperswitch-card-vault/src/storage/types.rs | crate: src use diesel::{ backend::Backend, deserialize::{self, FromSql}, serialize::ToSql, sql_types, AsExpression, Identifiable, Insertable, Queryable, }; use masking::{ExposeInterface, PeekInterface, Secret, StrongSecret}; fn from_sql(bytes: DB::R...
ast_fragments
<|fim_prefix|> // file: hyperswitch-card-vault/src/storage/types.rs | crate: src use masking::{ExposeInterface, PeekInterface, Secret, StrongSecret}; fn from(value: Secret<Vec<u8>>) -> Self { <|fim_suffix|> <|fim_middle|> }
ast_fragments
<|fim_prefix|> // file: hyperswitch-card-vault/src/storage/types.rs | crate: src fn from(value: Vec<u8>) -> Self { {<|fim_suffix|> <|fim_middle|> }}
ast_fragments
<|fim_prefix|> // file: hyperswitch-card-vault/src/storage/types.rs | crate: src use diesel::{ backend::Backend, deserialize::{self, FromSql}, serialize::ToSql, sql_types, AsExpression, Identifiable, Insertable, Queryable, }; use masking::{ExposeInterface, PeekInterface, Secret, StrongSecret}; pub fn ge...
ast_fragments
<|fim_prefix|> // file: hyperswitch-card-vault/src/storage/types.rs | crate: src use diesel::{ backend::Backend, deserialize::{self, FromSql}, serialize::ToSql, sql_types, AsExpression, Identifiable, Insertable, Queryable, }; use masking::{ExposeInterface, PeekInterface, Secret, StrongSecret}; pub fn in...
ast_fragments
<|fim_prefix|> // file: hyperswitch-card-vault/src/storage/types.rs | crate: src use masking::{ExposeInterface, PeekInterface, Secret, StrongSecret}; pub fn new(item: Secret<Vec<u8>>) -> Self { {<|fim_suffix|> <|fim_middle|> }}
ast_fragments
<|fim_prefix|> // file: hyperswitch-card-vault/src/storage/types.rs | crate: src use diesel::{ backend::Backend, deserialize::{self, FromSql}, serialize::ToSql, sql_types, AsExpression, Identifiable, Insertable, Queryable, }; use masking::{ExposeInterface, PeekInterface, Secret, StrongSecret}; fn deref(...
ast_fragments
<|fim_prefix|> // file: hyperswitch-card-vault/src/storage/types.rs | crate: src use diesel::{ backend::Backend, deserialize::{self, FromSql}, serialize::ToSql, sql_types, AsExpression, Identifiable, Insertable, Queryable, }; pub fn into_bytes(self) -> Vec<u8> { <|fim_suffix|> <|fim_middle|> }
ast_fragments
<|fim_prefix|> // file: hyperswitch-card-vault/src/storage/types.rs | crate: src use diesel::{ backend::Backend, deserialize::{self, FromSql}, serialize::ToSql, sql_types, AsExpression, Identifiable, Insertable, Queryable, }; use crate::{ crypto::encryption_manager::{encryption_interface::Encryption...
ast_fragments
// file: hyperswitch-card-vault/src/storage/types.rs | crate: src use crate::{ crypto::encryption_manager::{encryption_interface::Encryption, managers::aes::GcmAes256}, error, routes::data::types::{StoreCardRequest, Validation}, }; use super::schema; pub fn new(request: StoreCardRequest, hash_id: &'a str, e...
ast_fragments
<|fim_prefix|> // file: hyperswitch-card-vault/src/storage/types.rs | crate: src fn from(value: Encrypted) -> Self { {<|fim_suffix|> <|fim_middle|> }}
ast_fragments
<|fim_prefix|> // file: hyperswitch-card-vault/src/storage/types.rs | crate: src use masking::{ExposeInterface, PeekInterface, Secret, StrongSecret}; pub fn from_decrypted_data(decrypted_data: StrongSecret<Vec<u8>>) -> Self { <|fim_suffix|> <|fim_middle|> }
ast_fragments
<|fim_prefix|> // file: hyperswitch-card-vault/src/storage/types.rs | crate: src use diesel::{ backend::Backend, deserialize::{self, FromSql}, serialize::ToSql, sql_types, AsExpression, Identifiable, Insertable, Queryable, }; use masking::{ExposeInterface, PeekInterface, Secret, StrongSecret}; pub fn ge...
ast_fragments
<|fim_prefix|> // file: hyperswitch-card-vault/src/storage/types.rs | crate: src use diesel::{ backend::Backend, deserialize::{self, FromSql}, serialize::ToSql, sql_types, AsExpression, Identifiable, Insertable, Queryable, }; use masking::{ExposeInterface, PeekInterface, Secret, StrongSecret}; pub fn ge...
ast_fragments
<|fim_prefix|> // file: hyperswitch-card-vault/src/storage/types.rs | crate: src use crate::{ crypto::encryption_manager::{encryption_interface::Encryption, managers::aes::GcmAes256}, error, routes::data::types::{StoreCardRequest, Validation}, }; fn from(value: LockerInner) -> Self { {<|fim_suffix|> <|fim_m...
ast_fragments
<|fim_prefix|> // file: hyperswitch-card-vault/src/storage/storage_v2/types.rs | crate: src use crate::{ routes::routes_v2::data::types::StoreDataRequest, storage::{ schema, types::{Encryptable, Encrypted}, }, }; pub fn new(request: StoreDataRequest, encrypted_data: Encrypted) -> Self { {<|f...
ast_fragments
<|fim_prefix|> // file: hyperswitch-card-vault/src/storage/storage_v2/types.rs | crate: src use crate::{ routes::routes_v2::data::types::StoreDataRequest, storage::{ schema, types::{Encryptable, Encrypted}, }, }; fn from(value: VaultInner) -> Self { {<|fim_suffix|> <|fim_middle|> }}
ast_fragments
// file: hyperswitch-card-vault/src/storage/storage_v2/types.rs | crate: src use crate::{ routes::routes_v2::data::types::StoreDataRequest, storage::{ schema, types::{Encryptable, Encrypted}, }, }; pub fn new(request: StoreDataRequest, encrypted_data: Encrypted) -> Self { Self { ...
ast_fragments
<|fim_prefix|> // file: hyperswitch-card-vault/src/storage/storage_v2/db.rs | crate: src use diesel::{ associations::HasTable, query_dsl::methods::FilterDsl, BoolExpressionMethods, ExpressionMethods, }; use crate::{ crypto::encryption_manager::managers::aes::GcmAes256, error::{self, ContainerError, ResultCo...
ast_fragments
<|fim_prefix|> // file: hyperswitch-card-vault/src/storage/storage_v2/db.rs | crate: src use diesel::{ associations::HasTable, query_dsl::methods::FilterDsl, BoolExpressionMethods, ExpressionMethods, }; use masking::{ExposeInterface, Secret}; use crate::{ crypto::encryption_manager::managers::aes::GcmAes256, ...
ast_fragments
<|fim_prefix|> // file: hyperswitch-card-vault/src/storage/storage_v2/db.rs | crate: src use diesel::{ associations::HasTable, query_dsl::methods::FilterDsl, BoolExpressionMethods, ExpressionMethods, }; use masking::{ExposeInterface, Secret}; use crate::{ crypto::encryption_manager::managers::aes::GcmAes256, ...
ast_fragments
<|fim_prefix|> // file: hyperswitch-card-vault/src/storage/storage_v2/db.rs | crate: src use diesel::{ associations::HasTable, query_dsl::methods::FilterDsl, BoolExpressionMethods, ExpressionMethods, }; use masking::{ExposeInterface, Secret}; use crate::{ crypto::encryption_manager::managers::aes::GcmAes256, ...
ast_fragments
<|fim_prefix|> // file: hyperswitch-card-vault/src/storage/caching/hash_table.rs | crate: src use crate::{ error::ContainerError, storage::{self, types}, }; async fn find_by_data_hash( &self, data_hash: &[u8], ) -> Result<Option<types::HashTable>, ContainerError<Self::Error>> { { value @ Som...
ast_fragments
<|fim_prefix|> // file: hyperswitch-card-vault/src/error/transforms.rs | crate: src fn from(value: &'a super::DataEncryptionError) -> Self { { super::DataEncryptionError::RequestSendFailed | super::DataEncryptionError::ResponseDecodingFailed | super::DataEncryptionError::InternalServerError ...
ast_fragments
<|fim_prefix|> // file: hyperswitch-card-vault/src/error/transforms.rs | crate: src fn from(value: &'a super::DataKeyCreationError) -> Self { { super::DataKeyCreationError::RequestSendFailed | super::DataKeyCreationError::ResponseDecodingFailed | super::DataKeyCreationError::InternalServerError ...
ast_fragments
// file: hyperswitch-card-vault/src/error/transforms.rs | crate: src fn from(value: &'a super::ApiClientError) -> Self { match value { super::ApiClientError::ClientConstructionFailed | super::ApiClientError::HeaderMapConstructionFailed | super::ApiClientError::IdentityParseFa...
ast_fragments
<|fim_prefix|> // file: hyperswitch-card-vault/src/error/transforms.rs | crate: src fn from(value: &'a super::ApiClientError) -> Self { {<|fim_suffix|> <|fim_middle|> }}
ast_fragments
<|fim_prefix|> // file: hyperswitch-card-vault/src/error/transforms.rs | crate: src fn from(value: &'a super::DataDecryptionError) -> Self { {<|fim_suffix|> <|fim_middle|> }}
ast_fragments
<|fim_prefix|> // file: hyperswitch-card-vault/src/error/transforms.rs | crate: src fn from(value: &'a super::DataEncryptionError) -> Self { <|fim_suffix|> <|fim_middle|> }
ast_fragments
<|fim_prefix|> // file: hyperswitch-card-vault/src/error/transforms.rs | crate: src fn from(value: &'a super::DataKeyTransferError) -> Self { <|fim_suffix|> <|fim_middle|> }
ast_fragments
<|fim_prefix|> // file: hyperswitch-card-vault/src/error/transforms.rs | crate: src fn from(value: &'a super::DataKeyCreationError) -> Self { {<|fim_suffix|> <|fim_middle|> }}
ast_fragments
<|fim_prefix|> // file: hyperswitch-card-vault/src/error/transforms.rs | crate: src fn from(value: &'a super::KeyManagerError) -> Self { {<|fim_suffix|> <|fim_middle|> }}
ast_fragments
<|fim_prefix|> // file: hyperswitch-card-vault/src/error/transforms.rs | crate: src fn from(value: &'a super::EntityDBError) -> Self { <|fim_suffix|> <|fim_middle|> }
ast_fragments
<|fim_prefix|> // file: hyperswitch-card-vault/src/error/transforms.rs | crate: src fn from(value: &'a super::StorageError) -> Self { { super::StorageError::DBPoolError | super::StorageError::PoolClientFailure => { Self::DBError }<|fim_suffix|> <|fim_middle|> super::StorageError::InsertError...
ast_fragments
<|fim_prefix|> // file: hyperswitch-card-vault/src/error/transforms.rs | crate: src fn from(value: &'a super::TestDBError) -> Self { <|fim_suffix|> <|fim_middle|> }
ast_fragments
<|fim_prefix|> // file: hyperswitch-card-vault/src/error/transforms.rs | crate: src fn from(value: &'a super::HashDBError) -> Self { {<|fim_suffix|> <|fim_middle|> }}
ast_fragments
<|fim_prefix|> // file: hyperswitch-card-vault/src/error/transforms.rs | crate: src fn from(value: &'a super::VaultDBError) -> Self { { super::VaultDBError::DataEncryptionError | super::VaultDBError::DataDecryptionError => { Self::MerchantKeyError } super::VaultDBError::DBError => Self::Data...
ast_fragments
<|fim_prefix|> // file: hyperswitch-card-vault/src/error/transforms.rs | crate: src fn from(value: &'a super::MerchantDBError) -> Self { {<|fim_suffix|> <|fim_middle|> }}
ast_fragments
<|fim_prefix|> // file: hyperswitch-card-vault/src/error/transforms.rs | crate: src fn from(value: &'a super::CryptoError) -> Self { <|fim_suffix|> <|fim_middle|> }
ast_fragments
<|fim_prefix|> // file: hyperswitch-card-vault/src/error/transforms.rs | crate: src fn from(value: &'a super::FingerprintDBError) -> Self { <|fim_suffix|> <|fim_middle|> }
ast_fragments
<|fim_prefix|> // file: hyperswitch-card-vault/src/error/transforms.rs | crate: src fn from(value: &'a super::StorageError) -> Self { <|fim_suffix|> <|fim_middle|> }
ast_fragments
// file: hyperswitch-card-vault/src/error/transforms.rs | crate: src fn from(value: &'a super::StorageError) -> Self { match value { super::StorageError::DBPoolError | super::StorageError::PoolClientFailure => { Self::DBError } super::StorageError::FindError =...
ast_fragments
<|fim_prefix|> // file: hyperswitch-card-vault/src/error/container.rs | crate: src use std::error::Error; fn change_error(self, error: E2) -> Result<T, ContainerError<E2>> { { Ok(value) => Ok(value),<|fim_suffix|> <|fim_middle|> Err(err) => Err(ContainerError { error: error_stack::Report::from(err).chan...
ast_fragments
<|fim_prefix|> // file: hyperswitch-card-vault/src/error/container.rs | crate: src use std::error::Error; fn source(&self) -> Option<&(dyn Error + 'static)> { {<|fim_suffix|> <|fim_middle|> }}
ast_fragments
<|fim_prefix|> // file: hyperswitch-card-vault/src/error/container.rs | crate: src use std::error::Error; fn change_error(self, error: E2) -> Result<T, ContainerError<E2>> { <|fim_suffix|> <|fim_middle|> }
ast_fragments
<|fim_prefix|> // file: hyperswitch-card-vault/src/error/container.rs | crate: src use std::error::Error; fn from(value: ContainerError<T>) -> Self { {<|fim_suffix|> <|fim_middle|> }}
ast_fragments
// file: hyperswitch-card-vault/src/error/container.rs | crate: src use std::error::Error; fn source(&self) -> Option<&(dyn Error + 'static)> { Error::source(self.error.current_context()) }
ast_fragments
<|fim_prefix|> // file: hyperswitch-card-vault/src/error/container.rs | crate: src use std::error::Error; pub fn get_inner(&self) -> &E { <|fim_suffix|> <|fim_middle|> }
ast_fragments
<|fim_prefix|> // file: hyperswitch-card-vault/src/routes/routes_v2/data.rs | crate: src use axum::Json; use crate::{ crypto::keymanager::{self, KeyProvider}, custom_extractors::TenantStateResolver, error::{self, ContainerError, ResultContainerExt}, logger, routes::data::{crypto_operation, types::Va...
ast_fragments
<|fim_prefix|> // file: hyperswitch-card-vault/src/routes/routes_v2/data.rs | crate: src use axum::Json; use crate::{ crypto::keymanager::{self, KeyProvider}, custom_extractors::TenantStateResolver, error::{self, ContainerError, ResultContainerExt}, logger, routes::data::{crypto_operation, types::Va...
ast_fragments
<|fim_prefix|> // file: hyperswitch-card-vault/src/routes/routes_v2/data.rs | crate: src use axum::Json; use crate::{ crypto::keymanager::{self, KeyProvider}, custom_extractors::TenantStateResolver, error::{self, ContainerError, ResultContainerExt}, logger, routes::data::{crypto_operation, types::Va...
ast_fragments
<|fim_prefix|> // file: hyperswitch-card-vault/src/routes/routes_v2/data.rs | crate: src use axum::Json; use crate::{ crypto::keymanager::{self, KeyProvider}, custom_extractors::TenantStateResolver, error::{self, ContainerError, ResultContainerExt}, logger, routes::data::{crypto_operation, types::Va...
ast_fragments
<|fim_prefix|> // file: hyperswitch-card-vault/src/routes/data/transformers.rs | crate: src use crate::{ crypto::hash_manager::hash_interface::Encode, error::{self, ContainerError, ResultContainerExt}, storage, }; use super::types::{self, DataDuplicationCheck}; pub fn get_data_duplication_status( stored...
ast_fragments
<|fim_prefix|> // file: hyperswitch-card-vault/src/routes/data/transformers.rs | crate: src use crate::{ crypto::hash_manager::hash_interface::Encode, error::{self, ContainerError, ResultContainerExt}, storage, }; use super::types::{self, DataDuplicationCheck}; fn try_from(value: storage::types::Locker) -> ...
ast_fragments
<|fim_prefix|> // file: hyperswitch-card-vault/src/routes/data/transformers.rs | crate: src use crate::{ crypto::hash_manager::hash_interface::Encode, error::{self, ContainerError, ResultContainerExt}, storage, }; use super::types::{self, DataDuplicationCheck}; pub fn get_data_duplication_status( stored...
ast_fragments
<|fim_prefix|> // file: hyperswitch-card-vault/src/routes/data/transformers.rs | crate: src use crate::{ crypto::hash_manager::hash_interface::Encode, error::{self, ContainerError, ResultContainerExt}, storage, }; use super::types::{self, DataDuplicationCheck}; pub fn get_hash<T>( request: &types::Data,...
ast_fragments
<|fim_prefix|> // file: hyperswitch-card-vault/src/routes/data/transformers.rs | crate: src use crate::{ crypto::hash_manager::hash_interface::Encode, error::{self, ContainerError, ResultContainerExt}, storage, }; use super::types::{self, DataDuplicationCheck}; fn eq(&self, other: &types::Data) -> bool { <|...
ast_fragments
<|fim_prefix|> // file: hyperswitch-card-vault/src/routes/data/transformers.rs | crate: src use crate::{ crypto::hash_manager::hash_interface::Encode, error::{self, ContainerError, ResultContainerExt}, storage, }; use super::types::{self, DataDuplicationCheck}; fn from(value: storage::types::Fingerprint) ->...
ast_fragments
<|fim_prefix|> // file: hyperswitch-card-vault/src/routes/data/transformers.rs | crate: src use crate::{ crypto::hash_manager::hash_interface::Encode, error::{self, ContainerError, ResultContainerExt}, storage, }; use super::types::{self, DataDuplicationCheck}; fn try_from(value: storage::types::Locker) -> ...
ast_fragments
<|fim_prefix|> // file: hyperswitch-card-vault/src/routes/data/transformers.rs | crate: src use crate::{ crypto::hash_manager::hash_interface::Encode, error::{self, ContainerError, ResultContainerExt}, storage, }; use super::types::{self, DataDuplicationCheck}; fn from(value: storage::storage_v2::types::Vau...
ast_fragments
// file: hyperswitch-card-vault/src/routes/data/transformers.rs | crate: src use crate::{ crypto::hash_manager::hash_interface::Encode, error::{self, ContainerError, ResultContainerExt}, storage, }; use super::types::{self, DataDuplicationCheck}; fn from( (duplication_check, value): (Option<DataDupl...
ast_fragments
<|fim_prefix|> // file: hyperswitch-card-vault/src/routes/data/crypto_operation.rs | crate: src use crate::{ app::TenantAppState, crypto::keymanager::CryptoOperationsManager, error::{self, ContainerError, ResultContainerExt}, routes::data::types, storage::{ storage_v2::{types::VaultNew, Vaul...
ast_fragments
// file: hyperswitch-card-vault/src/routes/data/crypto_operation.rs | crate: src use crate::{ app::TenantAppState, crypto::keymanager::CryptoOperationsManager, error::{self, ContainerError, ResultContainerExt}, routes::data::types, storage::{ storage_v2::{types::VaultNew, VaultInterface}, ...
ast_fragments
<|fim_prefix|> // file: hyperswitch-card-vault/src/routes/data/crypto_operation.rs | crate: src use crate::{ app::TenantAppState, crypto::keymanager::CryptoOperationsManager, error::{self, ContainerError, ResultContainerExt}, routes::data::types, storage::{ storage_v2::{types::VaultNew, Vaul...
ast_fragments
<|fim_prefix|> // file: hyperswitch-card-vault/src/routes/data/crypto_operation.rs | crate: src use crate::{ app::TenantAppState, crypto::keymanager::CryptoOperationsManager, error::{self, ContainerError, ResultContainerExt}, routes::data::types, storage::{ storage_v2::{types::VaultNew, Vaul...
ast_fragments