id stringlengths 11 116 | type stringclasses 1
value | granularity stringclasses 4
values | content stringlengths 16 477k | metadata dict |
|---|---|---|---|---|
fn_clm_api_models_get_api_event_type_-3929976624230935782 | clm | function | // Repository: hyperswitch
// Crate: api_models
// Purpose: External API request/response types (what clients see)
// Module: crates/api_models/src/events/routing
// Implementation of crate::open_router::UpdateScoreResponse for ApiEventMetric
fn get_api_event_type(&self) -> Option<ApiEventsType> {
Some(ApiEven... | {
"crate": "api_models",
"file": null,
"file_size": null,
"is_async": false,
"is_pub": false,
"num_enums": null,
"num_structs": null,
"num_tables": null,
"score": 26,
"total_crates": null
} |
fn_clm_api_models_get_api_event_type_9156738102114714512 | clm | function | // Repository: hyperswitch
// Crate: api_models
// Purpose: External API request/response types (what clients see)
// Module: crates/api_models/src/events/apple_pay_certificates_migration
// Implementation of ApplePayCertificatesMigrationResponse for ApiEventMetric
fn get_api_event_type(&self) -> Option<common_utils::... | {
"crate": "api_models",
"file": null,
"file_size": null,
"is_async": false,
"is_pub": false,
"num_enums": null,
"num_structs": null,
"num_tables": null,
"score": 26,
"total_crates": null
} |
fn_clm_api_models_new_7518911253672902741 | clm | function | // Repository: hyperswitch
// Crate: api_models
// Purpose: External API request/response types (what clients see)
// Module: crates/api_models/src/analytics/payment_intents
// Inherent implementation for PaymentIntentMetricsBucketIdentifier
pub fn new(
status: Option<IntentStatus>,
currency: Option<Cu... | {
"crate": "api_models",
"file": null,
"file_size": null,
"is_async": false,
"is_pub": true,
"num_enums": null,
"num_structs": null,
"num_tables": null,
"score": 14463,
"total_crates": null
} |
fn_clm_api_models_from_7518911253672902741 | clm | function | // Repository: hyperswitch
// Crate: api_models
// Purpose: External API request/response types (what clients see)
// Module: crates/api_models/src/analytics/payment_intents
// Implementation of NameDescription for From<PaymentIntentDimensions>
fn from(value: PaymentIntentDimensions) -> Self {
Self {
... | {
"crate": "api_models",
"file": null,
"file_size": null,
"is_async": false,
"is_pub": false,
"num_enums": null,
"num_structs": null,
"num_tables": null,
"score": 2604,
"total_crates": null
} |
fn_clm_api_models_eq_7518911253672902741 | clm | function | // Repository: hyperswitch
// Crate: api_models
// Purpose: External API request/response types (what clients see)
// Module: crates/api_models/src/analytics/payment_intents
// Implementation of PaymentIntentMetricsBucketIdentifier for PartialEq
fn eq(&self, other: &Self) -> bool {
let mut left = DefaultHasher... | {
"crate": "api_models",
"file": null,
"file_size": null,
"is_async": false,
"is_pub": false,
"num_enums": null,
"num_structs": null,
"num_tables": null,
"score": 1670,
"total_crates": null
} |
fn_clm_api_models_hash_7518911253672902741 | clm | function | // Repository: hyperswitch
// Crate: api_models
// Purpose: External API request/response types (what clients see)
// Module: crates/api_models/src/analytics/payment_intents
// Implementation of PaymentIntentMetricsBucketIdentifier for Hash
fn hash<H: Hasher>(&self, state: &mut H) {
self.status.map(|i| i.to_st... | {
"crate": "api_models",
"file": null,
"file_size": null,
"is_async": false,
"is_pub": false,
"num_enums": null,
"num_structs": null,
"num_tables": null,
"score": 375,
"total_crates": null
} |
fn_clm_api_models_is_forex_metric_7518911253672902741 | clm | function | // Repository: hyperswitch
// Crate: api_models
// Purpose: External API request/response types (what clients see)
// Module: crates/api_models/src/analytics/payment_intents
// Implementation of PaymentIntentMetrics for ForexMetric
fn is_forex_metric(&self) -> bool {
matches!(
self,
Sel... | {
"crate": "api_models",
"file": null,
"file_size": null,
"is_async": false,
"is_pub": false,
"num_enums": null,
"num_structs": null,
"num_tables": null,
"score": 20,
"total_crates": null
} |
fn_clm_api_models_new_-7996058887255924228 | clm | function | // Repository: hyperswitch
// Crate: api_models
// Purpose: External API request/response types (what clients see)
// Module: crates/api_models/src/analytics/api_event
// Inherent implementation for ApiEventMetricsBucketIdentifier
pub fn new(normalized_time_range: TimeRange) -> Self {
Self {
time_b... | {
"crate": "api_models",
"file": null,
"file_size": null,
"is_async": false,
"is_pub": true,
"num_enums": null,
"num_structs": null,
"num_tables": null,
"score": 14463,
"total_crates": null
} |
fn_clm_api_models_from_-7996058887255924228 | clm | function | // Repository: hyperswitch
// Crate: api_models
// Purpose: External API request/response types (what clients see)
// Module: crates/api_models/src/analytics/api_event
// Implementation of NameDescription for From<ApiEventMetrics>
fn from(value: ApiEventMetrics) -> Self {
Self {
name: value.to_stri... | {
"crate": "api_models",
"file": null,
"file_size": null,
"is_async": false,
"is_pub": false,
"num_enums": null,
"num_structs": null,
"num_tables": null,
"score": 2604,
"total_crates": null
} |
fn_clm_api_models_eq_-7996058887255924228 | clm | function | // Repository: hyperswitch
// Crate: api_models
// Purpose: External API request/response types (what clients see)
// Module: crates/api_models/src/analytics/api_event
// Implementation of ApiEventMetricsBucketIdentifier for PartialEq
fn eq(&self, other: &Self) -> bool {
let mut left = DefaultHasher::new();
... | {
"crate": "api_models",
"file": null,
"file_size": null,
"is_async": false,
"is_pub": false,
"num_enums": null,
"num_structs": null,
"num_tables": null,
"score": 1670,
"total_crates": null
} |
fn_clm_api_models_hash_-7996058887255924228 | clm | function | // Repository: hyperswitch
// Crate: api_models
// Purpose: External API request/response types (what clients see)
// Module: crates/api_models/src/analytics/api_event
// Implementation of ApiEventMetricsBucketIdentifier for Hash
fn hash<H: Hasher>(&self, state: &mut H) {
self.time_bucket.hash(state);
}
| {
"crate": "api_models",
"file": null,
"file_size": null,
"is_async": false,
"is_pub": false,
"num_enums": null,
"num_structs": null,
"num_tables": null,
"score": 343,
"total_crates": null
} |
fn_clm_api_models_new_-4153158224871881047 | clm | function | // Repository: hyperswitch
// Crate: api_models
// Purpose: External API request/response types (what clients see)
// Module: crates/api_models/src/analytics/refunds
// Inherent implementation for RefundMetricsBucketIdentifier
pub fn new(
currency: Option<Currency>,
refund_status: Option<String>,
... | {
"crate": "api_models",
"file": null,
"file_size": null,
"is_async": false,
"is_pub": true,
"num_enums": null,
"num_structs": null,
"num_tables": null,
"score": 14463,
"total_crates": null
} |
fn_clm_api_models_from_-4153158224871881047 | clm | function | // Repository: hyperswitch
// Crate: api_models
// Purpose: External API request/response types (what clients see)
// Module: crates/api_models/src/analytics/refunds
// Implementation of NameDescription for From<RefundDimensions>
fn from(value: RefundDimensions) -> Self {
Self {
name: value.to_stri... | {
"crate": "api_models",
"file": null,
"file_size": null,
"is_async": false,
"is_pub": false,
"num_enums": null,
"num_structs": null,
"num_tables": null,
"score": 2604,
"total_crates": null
} |
fn_clm_api_models_eq_-4153158224871881047 | clm | function | // Repository: hyperswitch
// Crate: api_models
// Purpose: External API request/response types (what clients see)
// Module: crates/api_models/src/analytics/refunds
// Implementation of RefundMetricsBucketIdentifier for PartialEq
fn eq(&self, other: &Self) -> bool {
let mut left = DefaultHasher::new();
... | {
"crate": "api_models",
"file": null,
"file_size": null,
"is_async": false,
"is_pub": false,
"num_enums": null,
"num_structs": null,
"num_tables": null,
"score": 1670,
"total_crates": null
} |
fn_clm_api_models_hash_-4153158224871881047 | clm | function | // Repository: hyperswitch
// Crate: api_models
// Purpose: External API request/response types (what clients see)
// Module: crates/api_models/src/analytics/refunds
// Implementation of RefundMetricsBucketIdentifier for Hash
fn hash<H: Hasher>(&self, state: &mut H) {
self.currency.hash(state);
self.re... | {
"crate": "api_models",
"file": null,
"file_size": null,
"is_async": false,
"is_pub": false,
"num_enums": null,
"num_structs": null,
"num_tables": null,
"score": 357,
"total_crates": null
} |
fn_clm_api_models_is_forex_metric_-4153158224871881047 | clm | function | // Repository: hyperswitch
// Crate: api_models
// Purpose: External API request/response types (what clients see)
// Module: crates/api_models/src/analytics/refunds
// Implementation of RefundMetrics for ForexMetric
fn is_forex_metric(&self) -> bool {
matches!(
self,
Self::RefundProces... | {
"crate": "api_models",
"file": null,
"file_size": null,
"is_async": false,
"is_pub": false,
"num_enums": null,
"num_structs": null,
"num_tables": null,
"score": 20,
"total_crates": null
} |
fn_clm_api_models_new_-8067927215512100952 | clm | function | // Repository: hyperswitch
// Crate: api_models
// Purpose: External API request/response types (what clients see)
// Module: crates/api_models/src/analytics/payments
// Inherent implementation for PaymentMetricsBucketIdentifier
pub fn new(
currency: Option<Currency>,
status: Option<AttemptStatus>,
... | {
"crate": "api_models",
"file": null,
"file_size": null,
"is_async": false,
"is_pub": true,
"num_enums": null,
"num_structs": null,
"num_tables": null,
"score": 14463,
"total_crates": null
} |
fn_clm_api_models_from_-8067927215512100952 | clm | function | // Repository: hyperswitch
// Crate: api_models
// Purpose: External API request/response types (what clients see)
// Module: crates/api_models/src/analytics/payments
// Implementation of NameDescription for From<PaymentDimensions>
fn from(value: PaymentDimensions) -> Self {
Self {
name: value.to_s... | {
"crate": "api_models",
"file": null,
"file_size": null,
"is_async": false,
"is_pub": false,
"num_enums": null,
"num_structs": null,
"num_tables": null,
"score": 2604,
"total_crates": null
} |
fn_clm_api_models_eq_-8067927215512100952 | clm | function | // Repository: hyperswitch
// Crate: api_models
// Purpose: External API request/response types (what clients see)
// Module: crates/api_models/src/analytics/payments
// Implementation of PaymentMetricsBucketIdentifier for PartialEq
fn eq(&self, other: &Self) -> bool {
let mut left = DefaultHasher::new();
... | {
"crate": "api_models",
"file": null,
"file_size": null,
"is_async": false,
"is_pub": false,
"num_enums": null,
"num_structs": null,
"num_tables": null,
"score": 1670,
"total_crates": null
} |
fn_clm_api_models_hash_-8067927215512100952 | clm | function | // Repository: hyperswitch
// Crate: api_models
// Purpose: External API request/response types (what clients see)
// Module: crates/api_models/src/analytics/payments
// Implementation of PaymentMetricsBucketIdentifier for Hash
fn hash<H: Hasher>(&self, state: &mut H) {
self.currency.hash(state);
self.... | {
"crate": "api_models",
"file": null,
"file_size": null,
"is_async": false,
"is_pub": false,
"num_enums": null,
"num_structs": null,
"num_tables": null,
"score": 393,
"total_crates": null
} |
fn_clm_api_models_is_forex_metric_-8067927215512100952 | clm | function | // Repository: hyperswitch
// Crate: api_models
// Purpose: External API request/response types (what clients see)
// Module: crates/api_models/src/analytics/payments
// Implementation of PaymentMetrics for ForexMetric
fn is_forex_metric(&self) -> bool {
matches!(
self,
Self::PaymentPro... | {
"crate": "api_models",
"file": null,
"file_size": null,
"is_async": false,
"is_pub": false,
"num_enums": null,
"num_structs": null,
"num_tables": null,
"score": 20,
"total_crates": null
} |
fn_clm_api_models_new_6047362071030924709 | clm | function | // Repository: hyperswitch
// Crate: api_models
// Purpose: External API request/response types (what clients see)
// Module: crates/api_models/src/analytics/auth_events
// Inherent implementation for AuthEventMetricsBucketIdentifier
pub fn new(
authentication_status: Option<AuthenticationStatus>,
tran... | {
"crate": "api_models",
"file": null,
"file_size": null,
"is_async": false,
"is_pub": true,
"num_enums": null,
"num_structs": null,
"num_tables": null,
"score": 14463,
"total_crates": null
} |
fn_clm_api_models_from_6047362071030924709 | clm | function | // Repository: hyperswitch
// Crate: api_models
// Purpose: External API request/response types (what clients see)
// Module: crates/api_models/src/analytics/auth_events
// Implementation of NameDescription for From<AuthEventDimensions>
fn from(value: AuthEventDimensions) -> Self {
Self {
name: val... | {
"crate": "api_models",
"file": null,
"file_size": null,
"is_async": false,
"is_pub": false,
"num_enums": null,
"num_structs": null,
"num_tables": null,
"score": 2604,
"total_crates": null
} |
fn_clm_api_models_eq_6047362071030924709 | clm | function | // Repository: hyperswitch
// Crate: api_models
// Purpose: External API request/response types (what clients see)
// Module: crates/api_models/src/analytics/auth_events
// Implementation of AuthEventMetricsBucketIdentifier for PartialEq
fn eq(&self, other: &Self) -> bool {
let mut left = DefaultHasher::new();... | {
"crate": "api_models",
"file": null,
"file_size": null,
"is_async": false,
"is_pub": false,
"num_enums": null,
"num_structs": null,
"num_tables": null,
"score": 1670,
"total_crates": null
} |
fn_clm_api_models_hash_6047362071030924709 | clm | function | // Repository: hyperswitch
// Crate: api_models
// Purpose: External API request/response types (what clients see)
// Module: crates/api_models/src/analytics/auth_events
// Implementation of AuthEventMetricsBucketIdentifier for Hash
fn hash<H: Hasher>(&self, state: &mut H) {
self.authentication_status.hash(sta... | {
"crate": "api_models",
"file": null,
"file_size": null,
"is_async": false,
"is_pub": false,
"num_enums": null,
"num_structs": null,
"num_tables": null,
"score": 397,
"total_crates": null
} |
fn_clm_api_models_new_4724061517253240727 | clm | function | // Repository: hyperswitch
// Crate: api_models
// Purpose: External API request/response types (what clients see)
// Module: crates/api_models/src/analytics/disputes
// Inherent implementation for DisputeMetricsBucketIdentifier
pub fn new(
dispute_stage: Option<DisputeStage>,
connector: Option<String>... | {
"crate": "api_models",
"file": null,
"file_size": null,
"is_async": false,
"is_pub": true,
"num_enums": null,
"num_structs": null,
"num_tables": null,
"score": 14463,
"total_crates": null
} |
fn_clm_api_models_from_4724061517253240727 | clm | function | // Repository: hyperswitch
// Crate: api_models
// Purpose: External API request/response types (what clients see)
// Module: crates/api_models/src/analytics/disputes
// Implementation of NameDescription for From<DisputeMetrics>
fn from(value: DisputeMetrics) -> Self {
Self {
name: value.to_string(... | {
"crate": "api_models",
"file": null,
"file_size": null,
"is_async": false,
"is_pub": false,
"num_enums": null,
"num_structs": null,
"num_tables": null,
"score": 2604,
"total_crates": null
} |
fn_clm_api_models_eq_4724061517253240727 | clm | function | // Repository: hyperswitch
// Crate: api_models
// Purpose: External API request/response types (what clients see)
// Module: crates/api_models/src/analytics/disputes
// Implementation of DisputeMetricsBucketIdentifier for PartialEq
fn eq(&self, other: &Self) -> bool {
let mut left = DefaultHasher::new();
... | {
"crate": "api_models",
"file": null,
"file_size": null,
"is_async": false,
"is_pub": false,
"num_enums": null,
"num_structs": null,
"num_tables": null,
"score": 1670,
"total_crates": null
} |
fn_clm_api_models_hash_4724061517253240727 | clm | function | // Repository: hyperswitch
// Crate: api_models
// Purpose: External API request/response types (what clients see)
// Module: crates/api_models/src/analytics/disputes
// Implementation of DisputeMetricsBucketIdentifier for Hash
fn hash<H: Hasher>(&self, state: &mut H) {
self.dispute_stage.hash(state);
... | {
"crate": "api_models",
"file": null,
"file_size": null,
"is_async": false,
"is_pub": false,
"num_enums": null,
"num_structs": null,
"num_tables": null,
"score": 349,
"total_crates": null
} |
fn_clm_api_models_is_forex_metric_4724061517253240727 | clm | function | // Repository: hyperswitch
// Crate: api_models
// Purpose: External API request/response types (what clients see)
// Module: crates/api_models/src/analytics/disputes
// Implementation of DisputeMetrics for ForexMetric
fn is_forex_metric(&self) -> bool {
matches!(
self,
Self::TotalAmoun... | {
"crate": "api_models",
"file": null,
"file_size": null,
"is_async": false,
"is_pub": false,
"num_enums": null,
"num_structs": null,
"num_tables": null,
"score": 20,
"total_crates": null
} |
fn_clm_api_models_new_1010546913635661104 | clm | function | // Repository: hyperswitch
// Crate: api_models
// Purpose: External API request/response types (what clients see)
// Module: crates/api_models/src/analytics/frm
// Inherent implementation for FrmMetricsBucketIdentifier
pub fn new(
frm_status: Option<String>,
frm_name: Option<String>,
frm_trans... | {
"crate": "api_models",
"file": null,
"file_size": null,
"is_async": false,
"is_pub": true,
"num_enums": null,
"num_structs": null,
"num_tables": null,
"score": 14463,
"total_crates": null
} |
fn_clm_api_models_from_1010546913635661104 | clm | function | // Repository: hyperswitch
// Crate: api_models
// Purpose: External API request/response types (what clients see)
// Module: crates/api_models/src/analytics/frm
// Implementation of NameDescription for From<FrmDimensions>
fn from(value: FrmDimensions) -> Self {
Self {
name: value.to_string(),
... | {
"crate": "api_models",
"file": null,
"file_size": null,
"is_async": false,
"is_pub": false,
"num_enums": null,
"num_structs": null,
"num_tables": null,
"score": 2604,
"total_crates": null
} |
fn_clm_api_models_eq_1010546913635661104 | clm | function | // Repository: hyperswitch
// Crate: api_models
// Purpose: External API request/response types (what clients see)
// Module: crates/api_models/src/analytics/frm
// Implementation of FrmMetricsBucketIdentifier for PartialEq
fn eq(&self, other: &Self) -> bool {
let mut left = DefaultHasher::new();
self.... | {
"crate": "api_models",
"file": null,
"file_size": null,
"is_async": false,
"is_pub": false,
"num_enums": null,
"num_structs": null,
"num_tables": null,
"score": 1670,
"total_crates": null
} |
fn_clm_api_models_hash_1010546913635661104 | clm | function | // Repository: hyperswitch
// Crate: api_models
// Purpose: External API request/response types (what clients see)
// Module: crates/api_models/src/analytics/frm
// Implementation of FrmMetricsBucketIdentifier for Hash
fn hash<H: Hasher>(&self, state: &mut H) {
self.frm_status.hash(state);
self.frm_nam... | {
"crate": "api_models",
"file": null,
"file_size": null,
"is_async": false,
"is_pub": false,
"num_enums": null,
"num_structs": null,
"num_tables": null,
"score": 349,
"total_crates": null
} |
fn_clm_api_models_new_-8166346604476905081 | clm | function | // Repository: hyperswitch
// Crate: api_models
// Purpose: External API request/response types (what clients see)
// Module: crates/api_models/src/analytics/active_payments
// Inherent implementation for ActivePaymentsMetricsBucketIdentifier
pub fn new(time_bucket: Option<String>) -> Self {
Self { time_bucket... | {
"crate": "api_models",
"file": null,
"file_size": null,
"is_async": false,
"is_pub": true,
"num_enums": null,
"num_structs": null,
"num_tables": null,
"score": 14463,
"total_crates": null
} |
fn_clm_api_models_from_-8166346604476905081 | clm | function | // Repository: hyperswitch
// Crate: api_models
// Purpose: External API request/response types (what clients see)
// Module: crates/api_models/src/analytics/active_payments
// Implementation of NameDescription for From<ActivePaymentsMetrics>
fn from(value: ActivePaymentsMetrics) -> Self {
Self {
n... | {
"crate": "api_models",
"file": null,
"file_size": null,
"is_async": false,
"is_pub": false,
"num_enums": null,
"num_structs": null,
"num_tables": null,
"score": 2604,
"total_crates": null
} |
fn_clm_api_models_eq_-8166346604476905081 | clm | function | // Repository: hyperswitch
// Crate: api_models
// Purpose: External API request/response types (what clients see)
// Module: crates/api_models/src/analytics/active_payments
// Implementation of ActivePaymentsMetricsBucketIdentifier for PartialEq
fn eq(&self, other: &Self) -> bool {
let mut left = DefaultHashe... | {
"crate": "api_models",
"file": null,
"file_size": null,
"is_async": false,
"is_pub": false,
"num_enums": null,
"num_structs": null,
"num_tables": null,
"score": 1670,
"total_crates": null
} |
fn_clm_api_models_hash_-8166346604476905081 | clm | function | // Repository: hyperswitch
// Crate: api_models
// Purpose: External API request/response types (what clients see)
// Module: crates/api_models/src/analytics/active_payments
// Implementation of ActivePaymentsMetricsBucketIdentifier for Hash
fn hash<H: Hasher>(&self, state: &mut H) {
self.time_bucket.hash(stat... | {
"crate": "api_models",
"file": null,
"file_size": null,
"is_async": false,
"is_pub": false,
"num_enums": null,
"num_structs": null,
"num_tables": null,
"score": 343,
"total_crates": null
} |
fn_clm_api_models_is_all_none_-4517366609312514188 | clm | function | // Repository: hyperswitch
// Crate: api_models
// Purpose: External API request/response types (what clients see)
// Module: crates/api_models/src/analytics/search
// Inherent implementation for SearchFilters
pub fn is_all_none(&self) -> bool {
self.payment_method.is_none()
&& self.currency.is_non... | {
"crate": "api_models",
"file": null,
"file_size": null,
"is_async": false,
"is_pub": true,
"num_enums": null,
"num_structs": null,
"num_tables": null,
"score": 48,
"total_crates": null
} |
fn_clm_api_models_new_2517877275784176932 | clm | function | // Repository: hyperswitch
// Crate: api_models
// Purpose: External API request/response types (what clients see)
// Module: crates/api_models/src/analytics/sdk_events
// Inherent implementation for SdkEventMetricsBucketIdentifier
pub fn new(
payment_method: Option<String>,
platform: Option<String>,
... | {
"crate": "api_models",
"file": null,
"file_size": null,
"is_async": false,
"is_pub": true,
"num_enums": null,
"num_structs": null,
"num_tables": null,
"score": 14463,
"total_crates": null
} |
fn_clm_api_models_from_2517877275784176932 | clm | function | // Repository: hyperswitch
// Crate: api_models
// Purpose: External API request/response types (what clients see)
// Module: crates/api_models/src/analytics/sdk_events
// Implementation of NameDescription for From<SdkEventDimensions>
fn from(value: SdkEventDimensions) -> Self {
Self {
name: value.... | {
"crate": "api_models",
"file": null,
"file_size": null,
"is_async": false,
"is_pub": false,
"num_enums": null,
"num_structs": null,
"num_tables": null,
"score": 2604,
"total_crates": null
} |
fn_clm_api_models_eq_2517877275784176932 | clm | function | // Repository: hyperswitch
// Crate: api_models
// Purpose: External API request/response types (what clients see)
// Module: crates/api_models/src/analytics/sdk_events
// Implementation of SdkEventMetricsBucketIdentifier for PartialEq
fn eq(&self, other: &Self) -> bool {
let mut left = DefaultHasher::new();
... | {
"crate": "api_models",
"file": null,
"file_size": null,
"is_async": false,
"is_pub": false,
"num_enums": null,
"num_structs": null,
"num_tables": null,
"score": 1670,
"total_crates": null
} |
fn_clm_api_models_hash_2517877275784176932 | clm | function | // Repository: hyperswitch
// Crate: api_models
// Purpose: External API request/response types (what clients see)
// Module: crates/api_models/src/analytics/sdk_events
// Implementation of SdkEventMetricsBucketIdentifier for Hash
fn hash<H: Hasher>(&self, state: &mut H) {
self.payment_method.hash(state);
... | {
"crate": "api_models",
"file": null,
"file_size": null,
"is_async": false,
"is_pub": false,
"num_enums": null,
"num_structs": null,
"num_tables": null,
"score": 355,
"total_crates": null
} |
fn_clm_router_env_main_2224544886447532853 | clm | function | // Repository: hyperswitch
// Crate: router_env
// Module: crates/router_env/build
fn main() {
vergen::generate_cargo_instructions();
cargo_workspace::verify_cargo_metadata_format();
cargo_workspace::set_cargo_workspace_members_env();
}
| {
"crate": "router_env",
"file": null,
"file_size": null,
"is_async": false,
"is_pub": false,
"num_enums": null,
"num_structs": null,
"num_tables": null,
"score": 6,
"total_crates": null
} |
fn_clm_router_env_logger_-3283779011313747271 | clm | function | // Repository: hyperswitch
// Crate: router_env
// Module: crates/router_env/tests/logger
fn logger() -> error_stack::Result<&'static TelemetryGuard, ConfigError> {
use std::sync::OnceLock;
static INSTANCE: OnceLock<TelemetryGuard> = OnceLock::new();
Ok(INSTANCE.get_or_init(|| {
let config = route... | {
"crate": "router_env",
"file": null,
"file_size": null,
"is_async": false,
"is_pub": false,
"num_enums": null,
"num_structs": null,
"num_tables": null,
"score": 11,
"total_crates": null
} |
fn_clm_router_env_basic_-3283779011313747271 | clm | function | // Repository: hyperswitch
// Crate: router_env
// Module: crates/router_env/tests/logger
async fn basic() -> Result<(), Box<dyn std::error::Error + Send + Sync>> {
logger()?;
fn_with_colon(13).await;
Ok(())
}
| {
"crate": "router_env",
"file": null,
"file_size": null,
"is_async": false,
"is_pub": false,
"num_enums": null,
"num_structs": null,
"num_tables": null,
"score": 4,
"total_crates": null
} |
fn_clm_router_env_fn_with_colon_-1559977290335611586 | clm | function | // Repository: hyperswitch
// Crate: router_env
// Module: crates/router_env/tests/test_module
pub async fn fn_with_colon(val: i32) {
let a = 13;
let b = 31;
logger::log!(
logger::Level::WARN,
?a,
?b,
tag = ?logger::Tag::ApiIncomingRequest,
category = ?logger::Categ... | {
"crate": "router_env",
"file": null,
"file_size": null,
"is_async": false,
"is_pub": true,
"num_enums": null,
"num_structs": null,
"num_tables": null,
"score": 15,
"total_crates": null
} |
fn_clm_router_env_fn_without_colon_-1559977290335611586 | clm | function | // Repository: hyperswitch
// Crate: router_env
// Module: crates/router_env/tests/test_module
pub async fn fn_without_colon(val: i32) {
let a = 13;
let b = 31;
// trace_macros!(true);
logger::log!(
logger::Level::INFO,
?a,
?b,
tag = ?logger::Tag::ApiIncomingRequest,
... | {
"crate": "router_env",
"file": null,
"file_size": null,
"is_async": false,
"is_pub": true,
"num_enums": null,
"num_structs": null,
"num_tables": null,
"score": 13,
"total_crates": null
} |
fn_clm_router_env_basic_7478459033502217048 | clm | function | // Repository: hyperswitch
// Crate: router_env
// Module: crates/router_env/tests/env
async fn basic() -> Result<(), Box<dyn std::error::Error + Send + Sync>> {
println!("CARGO_PKG_VERSION : {:?}", env!("CARGO_PKG_VERSION"));
println!("CARGO_PROFILE : {:?}", env!("CARGO_PROFILE"));
println!(
"GIT... | {
"crate": "router_env",
"file": null,
"file_size": null,
"is_async": false,
"is_pub": false,
"num_enums": null,
"num_structs": null,
"num_tables": null,
"score": 0,
"total_crates": null
} |
fn_clm_router_env_env_macro_7478459033502217048 | clm | function | // Repository: hyperswitch
// Crate: router_env
// Module: crates/router_env/tests/env
async fn env_macro() {
println!("version : {:?}", env::version!());
println!("build : {:?}", env::build!());
println!("commit : {:?}", env::commit!());
// println!("platform : {:?}", env::platform!());
assert!(!... | {
"crate": "router_env",
"file": null,
"file_size": null,
"is_async": false,
"is_pub": false,
"num_enums": null,
"num_structs": null,
"num_tables": null,
"score": 0,
"total_crates": null
} |
fn_clm_router_env_generate_cargo_instructions_6908143402024095378 | clm | function | // Repository: hyperswitch
// Crate: router_env
// Module: crates/router_env/src/vergen
pub fn generate_cargo_instructions() {}
| {
"crate": "router_env",
"file": null,
"file_size": null,
"is_async": false,
"is_pub": true,
"num_enums": null,
"num_structs": null,
"num_tables": null,
"score": 19,
"total_crates": null
} |
fn_clm_router_env_which_7693002332316351178 | clm | function | // Repository: hyperswitch
// Crate: router_env
// Module: crates/router_env/src/env
/// Name of current environment. Either "development", "sandbox" or "production".
pub fn which() -> Env {
#[cfg(debug_assertions)]
let default_env = Env::Development;
#[cfg(not(debug_assertions))]
let default_env = E... | {
"crate": "router_env",
"file": null,
"file_size": null,
"is_async": false,
"is_pub": true,
"num_enums": null,
"num_structs": null,
"num_tables": null,
"score": 57,
"total_crates": null
} |
fn_clm_router_env_workspace_path_7693002332316351178 | clm | function | // Repository: hyperswitch
// Crate: router_env
// Module: crates/router_env/src/env
/// Path to the root directory of the cargo workspace.
/// It is recommended that this be used by the application as the base path to build other paths
/// such as configuration and logs directories.
pub fn workspace_path() -> Pat... | {
"crate": "router_env",
"file": null,
"file_size": null,
"is_async": false,
"is_pub": true,
"num_enums": null,
"num_structs": null,
"num_tables": null,
"score": 35,
"total_crates": null
} |
fn_clm_router_env_prefix_for_env_7693002332316351178 | clm | function | // Repository: hyperswitch
// Crate: router_env
// Module: crates/router_env/src/env
/// Three letter (lowercase) prefix corresponding to the current environment.
/// Either `dev`, `snd` or `prd`.
pub fn prefix_for_env() -> &'static str {
match which() {
Env::Development => "dev",
Env::Sandbox =... | {
"crate": "router_env",
"file": null,
"file_size": null,
"is_async": false,
"is_pub": true,
"num_enums": null,
"num_structs": null,
"num_tables": null,
"score": 18,
"total_crates": null
} |
fn_clm_router_env_f64_histogram_buckets_-8429734805293826079 | clm | function | // Repository: hyperswitch
// Crate: router_env
// Module: crates/router_env/src/metrics
pub fn f64_histogram_buckets() -> Vec<f64> {
let mut init = 0.01;
let mut buckets: [f64; 15] = [0.0; 15];
for bucket in &mut buckets {
init *= 2.0;
*bucket = init;
}
... | {
"crate": "router_env",
"file": null,
"file_size": null,
"is_async": false,
"is_pub": true,
"num_enums": null,
"num_structs": null,
"num_tables": null,
"score": 12,
"total_crates": null
} |
fn_clm_router_env_set_cargo_workspace_members_env_3744130306027947775 | clm | function | // Repository: hyperswitch
// Crate: router_env
// Module: crates/router_env/src/cargo_workspace
pub fn set_cargo_workspace_members_env() {
use std::io::Write;
let metadata = cargo_metadata::MetadataCommand::new()
.exec()
.expect("Failed to obtain cargo metadata");
let workspace_members =... | {
"crate": "router_env",
"file": null,
"file_size": null,
"is_async": false,
"is_pub": true,
"num_enums": null,
"num_structs": null,
"num_tables": null,
"score": 27,
"total_crates": null
} |
fn_clm_router_env_verify_cargo_metadata_format_3744130306027947775 | clm | function | // Repository: hyperswitch
// Crate: router_env
// Module: crates/router_env/src/cargo_workspace
/// Verify that the cargo metadata workspace packages format matches that expected by
/// [`set_cargo_workspace_members_env`] to set the `CARGO_WORKSPACE_MEMBERS` environment variable.
///
/// This function should be ty... | {
"crate": "router_env",
"file": null,
"file_size": null,
"is_async": false,
"is_pub": true,
"num_enums": null,
"num_structs": null,
"num_tables": null,
"score": 17,
"total_crates": null
} |
fn_clm_router_env_new_-5812462620863543274 | clm | function | // Repository: hyperswitch
// Crate: router_env
// Module: crates/router_env/src/logger/config
// Implementation of None for Config
/// Default constructor.
pub fn new() -> Result<Self, config::ConfigError> {
Self::new_with_config_path(None)
}
| {
"crate": "router_env",
"file": null,
"file_size": null,
"is_async": false,
"is_pub": true,
"num_enums": null,
"num_structs": null,
"num_tables": null,
"score": 14465,
"total_crates": null
} |
fn_clm_router_env_deserialize_-5812462620863543274 | clm | function | // Repository: hyperswitch
// Crate: router_env
// Module: crates/router_env/src/logger/config
// Implementation of Level for Deserialize<'de>
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
use std::str::FromStr as _;
let s = String::d... | {
"crate": "router_env",
"file": null,
"file_size": null,
"is_async": false,
"is_pub": false,
"num_enums": null,
"num_structs": null,
"num_tables": null,
"score": 142,
"total_crates": null
} |
fn_clm_router_env_builder_-5812462620863543274 | clm | function | // Repository: hyperswitch
// Crate: router_env
// Module: crates/router_env/src/logger/config
// Implementation of None for Config
/// Construct config builder extending it by fall-back defaults and setting config file to load.
pub fn builder(
environment: &str,
) -> Result<config::ConfigBuilder<config:... | {
"crate": "router_env",
"file": null,
"file_size": null,
"is_async": false,
"is_pub": true,
"num_enums": null,
"num_structs": null,
"num_tables": null,
"score": 103,
"total_crates": null
} |
fn_clm_router_env_new_with_config_path_-5812462620863543274 | clm | function | // Repository: hyperswitch
// Crate: router_env
// Module: crates/router_env/src/logger/config
// Implementation of None for Config
/// Constructor expecting config path set explicitly.
pub fn new_with_config_path(
explicit_config_path: Option<PathBuf>,
) -> Result<Self, config::ConfigError> {
//... | {
"crate": "router_env",
"file": null,
"file_size": null,
"is_async": false,
"is_pub": true,
"num_enums": null,
"num_structs": null,
"num_tables": null,
"score": 51,
"total_crates": null
} |
fn_clm_router_env_get_config_directory_-5812462620863543274 | clm | function | // Repository: hyperswitch
// Crate: router_env
// Module: crates/router_env/src/logger/config
// Implementation of None for Config
/// Get the Directory for the config file
/// Read the env variable `CONFIG_DIR` or fallback to `config`
pub fn get_config_directory() -> PathBuf {
let mut config_path = PathBu... | {
"crate": "router_env",
"file": null,
"file_size": null,
"is_async": false,
"is_pub": true,
"num_enums": null,
"num_structs": null,
"num_tables": null,
"score": 38,
"total_crates": null
} |
fn_clm_router_env_new_2422682527716497478 | clm | function | // Repository: hyperswitch
// Crate: router_env
// Module: crates/router_env/src/logger/formatter
// Implementation of None for FormattingLayer<W, F>
/// Constructor of `FormattingLayer`.
///
/// A `name` will be attached to all records during formatting.
/// A `dst_writer` to forward all records.
///
/// ## Exam... | {
"crate": "router_env",
"file": null,
"file_size": null,
"is_async": false,
"is_pub": true,
"num_enums": null,
"num_structs": null,
"num_tables": null,
"score": 14467,
"total_crates": null
} |
fn_clm_router_env_common_serialize_2422682527716497478 | clm | function | // Repository: hyperswitch
// Crate: router_env
// Module: crates/router_env/src/logger/formatter
// Implementation of None for FormattingLayer<W, F>
/// Serialize common for both span and event entries.
fn common_serialize<S>(
&self,
map_serializer: &mut impl SerializeMap<Error = serde_json::Error>,... | {
"crate": "router_env",
"file": null,
"file_size": null,
"is_async": false,
"is_pub": false,
"num_enums": null,
"num_structs": null,
"num_tables": null,
"score": 104,
"total_crates": null
} |
fn_clm_router_env_new_with_implicit_entries_2422682527716497478 | clm | function | // Repository: hyperswitch
// Crate: router_env
// Module: crates/router_env/src/logger/formatter
// Implementation of None for FormattingLayer<W, F>
/// Construct of `FormattingLayer with implicit default entries.
pub fn new_with_implicit_entries(
service: &str,
dst_writer: W,
default_fields... | {
"crate": "router_env",
"file": null,
"file_size": null,
"is_async": false,
"is_pub": true,
"num_enums": null,
"num_structs": null,
"num_tables": null,
"score": 49,
"total_crates": null
} |
fn_clm_router_env_event_serialize_2422682527716497478 | clm | function | // Repository: hyperswitch
// Crate: router_env
// Module: crates/router_env/src/logger/formatter
// Implementation of None for FormattingLayer<W, F>
/// Serialize event into a buffer of bytes using parent span.
pub fn event_serialize<S>(
&self,
span: Option<&SpanRef<'_, S>>,
event: &Event<'_... | {
"crate": "router_env",
"file": null,
"file_size": null,
"is_async": false,
"is_pub": true,
"num_enums": null,
"num_structs": null,
"num_tables": null,
"score": 43,
"total_crates": null
} |
fn_clm_router_env_fmt_2422682527716497478 | clm | function | // Repository: hyperswitch
// Crate: router_env
// Module: crates/router_env/src/logger/formatter
// Implementation of RecordType for fmt::Display
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
let repr = match self {
Self::EnterSpan => "START",
Self::ExitSpan => "END",
... | {
"crate": "router_env",
"file": null,
"file_size": null,
"is_async": false,
"is_pub": false,
"num_enums": null,
"num_structs": null,
"num_tables": null,
"score": 38,
"total_crates": null
} |
fn_clm_router_env_new_467850286845899013 | clm | function | // Repository: hyperswitch
// Crate: router_env
// Module: crates/router_env/src/logger/storage
// Inherent implementation for Storage<'a>
/// Default constructor.
pub fn new() -> Self {
Self::default()
}
| {
"crate": "router_env",
"file": null,
"file_size": null,
"is_async": false,
"is_pub": true,
"num_enums": null,
"num_structs": null,
"num_tables": null,
"score": 14465,
"total_crates": null
} |
fn_clm_router_env_default_467850286845899013 | clm | function | // Repository: hyperswitch
// Crate: router_env
// Module: crates/router_env/src/logger/storage
// Implementation of Storage<'_> for Default
fn default() -> Self {
Self {
values: HashMap::new(),
}
}
| {
"crate": "router_env",
"file": null,
"file_size": null,
"is_async": false,
"is_pub": false,
"num_enums": null,
"num_structs": null,
"num_tables": null,
"score": 7705,
"total_crates": null
} |
fn_clm_router_env_record_value_467850286845899013 | clm | function | // Repository: hyperswitch
// Crate: router_env
// Module: crates/router_env/src/logger/storage
// Inherent implementation for Storage<'a>
pub fn record_value(&mut self, key: &'a str, value: serde_json::Value) {
if super::formatter::IMPLICIT_KEYS.contains(key) {
tracing::warn!(value =? value, "{} i... | {
"crate": "router_env",
"file": null,
"file_size": null,
"is_async": false,
"is_pub": true,
"num_enums": null,
"num_structs": null,
"num_tables": null,
"score": 52,
"total_crates": null
} |
fn_clm_router_env_on_close_467850286845899013 | clm | function | // Repository: hyperswitch
// Crate: router_env
// Module: crates/router_env/src/logger/storage
// Implementation of StorageSubscription for Layer<S>
/// On close create an entry about how long did it take.
fn on_close(&self, span: Id, ctx: Context<'_, S>) {
#[allow(clippy::expect_used)]
let span = c... | {
"crate": "router_env",
"file": null,
"file_size": null,
"is_async": false,
"is_pub": false,
"num_enums": null,
"num_structs": null,
"num_tables": null,
"score": 46,
"total_crates": null
} |
fn_clm_router_env_on_new_span_467850286845899013 | clm | function | // Repository: hyperswitch
// Crate: router_env
// Module: crates/router_env/src/logger/storage
// Implementation of StorageSubscription for Layer<S>
/// On new span.
fn on_new_span(&self, attrs: &Attributes<'_>, id: &Id, ctx: Context<'_, S>) {
#[allow(clippy::expect_used)]
let span = ctx.span(id).ex... | {
"crate": "router_env",
"file": null,
"file_size": null,
"is_async": false,
"is_pub": false,
"num_enums": null,
"num_structs": null,
"num_tables": null,
"score": 28,
"total_crates": null
} |
fn_clm_router_env_default_-5379520896373146918 | clm | function | // Repository: hyperswitch
// Crate: router_env
// Module: crates/router_env/src/logger/defaults
// Implementation of super::config::LogConsole for Default
fn default() -> Self {
Self {
enabled: false,
level: super::config::Level(tracing::Level::INFO),
log_format: super::con... | {
"crate": "router_env",
"file": null,
"file_size": null,
"is_async": false,
"is_pub": false,
"num_enums": null,
"num_structs": null,
"num_tables": null,
"score": 7705,
"total_crates": null
} |
fn_clm_router_env_from_690358128547111026 | clm | function | // Repository: hyperswitch
// Crate: router_env
// Module: crates/router_env/src/logger/setup
// Implementation of TraceUrlAssert for From<String>
fn from(value: String) -> Self {
match value {
url if url.starts_with('*') => Self::EndsWith(url.trim_start_matches('*').to_string()),
url =... | {
"crate": "router_env",
"file": null,
"file_size": null,
"is_async": false,
"is_pub": false,
"num_enums": null,
"num_structs": null,
"num_tables": null,
"score": 2610,
"total_crates": null
} |
fn_clm_router_env_setup_690358128547111026 | clm | function | // Repository: hyperswitch
// Crate: router_env
// Module: crates/router_env/src/logger/setup
pub fn setup(
config: &config::Log,
service_name: &str,
crates_to_filter: impl AsRef<[&'static str]>,
) -> error_stack::Result<TelemetryGuard, ConfigError> {
let mut guards = Vec::new();
// Setup OpenTele... | {
"crate": "router_env",
"file": null,
"file_size": null,
"is_async": false,
"is_pub": true,
"num_enums": null,
"num_structs": null,
"num_tables": null,
"score": 144,
"total_crates": null
} |
fn_clm_router_env_setup_tracing_pipeline_690358128547111026 | clm | function | // Repository: hyperswitch
// Crate: router_env
// Module: crates/router_env/src/logger/setup
fn setup_tracing_pipeline(
config: &config::LogTelemetry,
service_name: &str,
) -> Option<
tracing_opentelemetry::OpenTelemetryLayer<
tracing_subscriber::Registry,
opentelemetry_sdk::trace::Tracer,... | {
"crate": "router_env",
"file": null,
"file_size": null,
"is_async": false,
"is_pub": false,
"num_enums": null,
"num_structs": null,
"num_tables": null,
"score": 79,
"total_crates": null
} |
fn_clm_router_env_setup_metrics_pipeline_690358128547111026 | clm | function | // Repository: hyperswitch
// Crate: router_env
// Module: crates/router_env/src/logger/setup
fn setup_metrics_pipeline(config: &config::LogTelemetry) {
use opentelemetry_otlp::WithExportConfig;
let exporter_result = opentelemetry_otlp::MetricExporter::builder()
.with_tonic()
.with_temporality... | {
"crate": "router_env",
"file": null,
"file_size": null,
"is_async": false,
"is_pub": false,
"num_enums": null,
"num_structs": null,
"num_tables": null,
"score": 51,
"total_crates": null
} |
fn_clm_router_env_get_envfilter_690358128547111026 | clm | function | // Repository: hyperswitch
// Crate: router_env
// Module: crates/router_env/src/logger/setup
fn get_envfilter(
filtering_directive: Option<&String>,
default_log_level: config::Level,
filter_log_level: config::Level,
crates_to_filter: impl AsRef<[&'static str]>,
) -> EnvFilter {
filtering_directive... | {
"crate": "router_env",
"file": null,
"file_size": null,
"is_async": false,
"is_pub": false,
"num_enums": null,
"num_structs": null,
"num_tables": null,
"score": 46,
"total_crates": null
} |
fn_clm_redis_interface_new_-4012931440397967071 | clm | function | // Repository: hyperswitch
// Crate: redis_interface
// Purpose: User-friendly Redis interface
// Module: crates/redis_interface/src/types
// Inherent implementation for RedisValue
pub fn new(value: FredRedisValue) -> Self {
Self { inner: value }
}
| {
"crate": "redis_interface",
"file": null,
"file_size": null,
"is_async": false,
"is_pub": true,
"num_enums": null,
"num_structs": null,
"num_tables": null,
"score": 14463,
"total_crates": null
} |
fn_clm_redis_interface_default_-4012931440397967071 | clm | function | // Repository: hyperswitch
// Crate: redis_interface
// Purpose: User-friendly Redis interface
// Module: crates/redis_interface/src/types
// Implementation of RedisSettings for Default
fn default() -> Self {
Self {
host: "127.0.0.1".to_string(),
port: 6379,
cluster_enabled:... | {
"crate": "redis_interface",
"file": null,
"file_size": null,
"is_async": false,
"is_pub": false,
"num_enums": null,
"num_structs": null,
"num_tables": null,
"score": 7705,
"total_crates": null
} |
fn_clm_redis_interface_from_-4012931440397967071 | clm | function | // Repository: hyperswitch
// Crate: redis_interface
// Purpose: User-friendly Redis interface
// Module: crates/redis_interface/src/types
// Implementation of RedisKey for From<T>
fn from(value: T) -> Self {
let value = value.as_ref();
Self(value.to_string())
}
| {
"crate": "redis_interface",
"file": null,
"file_size": null,
"is_async": false,
"is_pub": false,
"num_enums": null,
"num_structs": null,
"num_tables": null,
"score": 2606,
"total_crates": null
} |
fn_clm_redis_interface_into_inner_-4012931440397967071 | clm | function | // Repository: hyperswitch
// Crate: redis_interface
// Purpose: User-friendly Redis interface
// Module: crates/redis_interface/src/types
// Inherent implementation for RedisValue
pub fn into_inner(self) -> FredRedisValue {
self.inner
}
| {
"crate": "redis_interface",
"file": null,
"file_size": null,
"is_async": false,
"is_pub": true,
"num_enums": null,
"num_structs": null,
"num_tables": null,
"score": 2061,
"total_crates": null
} |
fn_clm_redis_interface_validate_-4012931440397967071 | clm | function | // Repository: hyperswitch
// Crate: redis_interface
// Purpose: User-friendly Redis interface
// Module: crates/redis_interface/src/types
// Inherent implementation for RedisSettings
/// Validates the Redis configuration provided.
pub fn validate(&self) -> CustomResult<(), errors::RedisError> {
use common_u... | {
"crate": "redis_interface",
"file": null,
"file_size": null,
"is_async": false,
"is_pub": true,
"num_enums": null,
"num_structs": null,
"num_tables": null,
"score": 243,
"total_crates": null
} |
fn_clm_redis_interface_clone_-3423949352232504364 | clm | function | // Repository: hyperswitch
// Crate: redis_interface
// Purpose: User-friendly Redis interface
// Module: crates/redis_interface/src/lib
// Implementation of None for RedisConnectionPool
pub fn clone(&self, key_prefix: &str) -> Self {
Self {
pool: Arc::clone(&self.pool),
key_prefix: key... | {
"crate": "redis_interface",
"file": null,
"file_size": null,
"is_async": false,
"is_pub": true,
"num_enums": null,
"num_structs": null,
"num_tables": null,
"score": 27345,
"total_crates": null
} |
fn_clm_redis_interface_new_-3423949352232504364 | clm | function | // Repository: hyperswitch
// Crate: redis_interface
// Purpose: User-friendly Redis interface
// Module: crates/redis_interface/src/lib
// Implementation of None for RedisConnectionPool
/// Create a new Redis connection
pub async fn new(conf: &RedisSettings) -> CustomResult<Self, errors::RedisError> {
let r... | {
"crate": "redis_interface",
"file": null,
"file_size": null,
"is_async": false,
"is_pub": true,
"num_enums": null,
"num_structs": null,
"num_tables": null,
"score": 14519,
"total_crates": null
} |
fn_clm_redis_interface_from_-3423949352232504364 | clm | function | // Repository: hyperswitch
// Crate: redis_interface
// Purpose: User-friendly Redis interface
// Module: crates/redis_interface/src/lib
// Implementation of RedisConfig for From<&RedisSettings>
fn from(config: &RedisSettings) -> Self {
Self {
default_ttl: config.default_ttl,
default_st... | {
"crate": "redis_interface",
"file": null,
"file_size": null,
"is_async": false,
"is_pub": false,
"num_enums": null,
"num_structs": null,
"num_tables": null,
"score": 2600,
"total_crates": null
} |
fn_clm_redis_interface_on_error_-3423949352232504364 | clm | function | // Repository: hyperswitch
// Crate: redis_interface
// Purpose: User-friendly Redis interface
// Module: crates/redis_interface/src/lib
// Implementation of None for RedisConnectionPool
pub async fn on_error(&self, tx: tokio::sync::oneshot::Sender<()>) {
use futures::StreamExt;
use tokio_stream::wrapp... | {
"crate": "redis_interface",
"file": null,
"file_size": null,
"is_async": false,
"is_pub": true,
"num_enums": null,
"num_structs": null,
"num_tables": null,
"score": 48,
"total_crates": null
} |
fn_clm_redis_interface_deref_-3423949352232504364 | clm | function | // Repository: hyperswitch
// Crate: redis_interface
// Purpose: User-friendly Redis interface
// Module: crates/redis_interface/src/lib
// Implementation of SubscriberClient for std::ops::Deref
fn deref(&self) -> &Self::Target {
&self.inner
}
| {
"crate": "redis_interface",
"file": null,
"file_size": null,
"is_async": false,
"is_pub": false,
"num_enums": null,
"num_structs": null,
"num_tables": null,
"score": 41,
"total_crates": null
} |
fn_clm_redis_interface_get_key_-1211265313444161731 | clm | function | // Repository: hyperswitch
// Crate: redis_interface
// Purpose: User-friendly Redis interface
// Module: crates/redis_interface/src/commands
// Implementation of None for super::RedisConnectionPool
pub async fn get_key<V>(&self, key: &RedisKey) -> CustomResult<V, errors::RedisError>
where
V: FromRedis + U... | {
"crate": "redis_interface",
"file": null,
"file_size": null,
"is_async": false,
"is_pub": true,
"num_enums": null,
"num_structs": null,
"num_tables": null,
"score": 102,
"total_crates": null
} |
fn_clm_redis_interface_delete_key_-1211265313444161731 | clm | function | // Repository: hyperswitch
// Crate: redis_interface
// Purpose: User-friendly Redis interface
// Module: crates/redis_interface/src/commands
// Implementation of None for super::RedisConnectionPool
pub async fn delete_key(&self, key: &RedisKey) -> CustomResult<DelReply, errors::RedisError> {
match self
... | {
"crate": "redis_interface",
"file": null,
"file_size": null,
"is_async": false,
"is_pub": true,
"num_enums": null,
"num_structs": null,
"num_tables": null,
"score": 93,
"total_crates": null
} |
fn_clm_redis_interface_set_key_if_not_exists_and_get_value_-1211265313444161731 | clm | function | // Repository: hyperswitch
// Crate: redis_interface
// Purpose: User-friendly Redis interface
// Module: crates/redis_interface/src/commands
// Implementation of None for super::RedisConnectionPool
pub async fn set_key_if_not_exists_and_get_value<V>(
&self,
key: &RedisKey,
value: V,
tt... | {
"crate": "redis_interface",
"file": null,
"file_size": null,
"is_async": false,
"is_pub": true,
"num_enums": null,
"num_structs": null,
"num_tables": null,
"score": 78,
"total_crates": null
} |
fn_clm_redis_interface_set_key_with_expiry_-1211265313444161731 | clm | function | // Repository: hyperswitch
// Crate: redis_interface
// Purpose: User-friendly Redis interface
// Module: crates/redis_interface/src/commands
// Implementation of None for super::RedisConnectionPool
pub async fn set_key_with_expiry<V>(
&self,
key: &RedisKey,
value: V,
seconds: i64,
... | {
"crate": "redis_interface",
"file": null,
"file_size": null,
"is_async": false,
"is_pub": true,
"num_enums": null,
"num_structs": null,
"num_tables": null,
"score": 74,
"total_crates": null
} |
fn_clm_redis_interface_serialize_and_set_key_with_expiry_-1211265313444161731 | clm | function | // Repository: hyperswitch
// Crate: redis_interface
// Purpose: User-friendly Redis interface
// Module: crates/redis_interface/src/commands
// Implementation of None for super::RedisConnectionPool
pub async fn serialize_and_set_key_with_expiry<V>(
&self,
key: &RedisKey,
value: V,
seco... | {
"crate": "redis_interface",
"file": null,
"file_size": null,
"is_async": false,
"is_pub": true,
"num_enums": null,
"num_structs": null,
"num_tables": null,
"score": 59,
"total_crates": null
} |
fn_clm_events_new_-8069846008937882624 | clm | function | // Repository: hyperswitch
// Crate: events
// Module: crates/events/src/lib
// Inherent implementation for EventContext<T, A>
/// Create a new event context.
pub fn new(message_sink: A) -> Self {
Self {
message_sink: Arc::new(message_sink),
metadata: HashMap::new(),
}
}
| {
"crate": "events",
"file": null,
"file_size": null,
"is_async": false,
"is_pub": true,
"num_enums": null,
"num_structs": null,
"num_tables": null,
"score": 14467,
"total_crates": null
} |
fn_clm_events_serialize_-8069846008937882624 | clm | function | // Repository: hyperswitch
// Crate: events
// Module: crates/events/src/lib
// Implementation of FlatMapEvent<T, A> for Serialize
fn serialize<S>(&self, serializer: S) -> core::result::Result<S::Ok, S::Error>
where
S: Serializer,
{
let mut serialize_map: HashMap<_, _> = self
.0
... | {
"crate": "events",
"file": null,
"file_size": null,
"is_async": false,
"is_pub": false,
"num_enums": null,
"num_structs": null,
"num_tables": null,
"score": 111,
"total_crates": null
} |
fn_clm_events_with_-8069846008937882624 | clm | function | // Repository: hyperswitch
// Crate: events
// Module: crates/events/src/lib
// Inherent implementation for EventBuilder<T, A, E, D>
/// Add metadata to the event.
pub fn with<F: ErasedMaskSerialize, G: EventInfo<Data = F> + 'static>(
mut self,
info: G,
) -> Self {
info.data()
... | {
"crate": "events",
"file": null,
"file_size": null,
"is_async": false,
"is_pub": true,
"num_enums": null,
"num_structs": null,
"num_tables": null,
"score": 84,
"total_crates": null
} |
fn_clm_events_emit_-8069846008937882624 | clm | function | // Repository: hyperswitch
// Crate: events
// Module: crates/events/src/lib
// Inherent implementation for EventContext<T, A>
/// Emit an event.
pub fn emit<D, E: Event<EventType = T, Data = D>>(&self, event: E) {
EventBuilder {
message_sink: self.message_sink.clone(),
metadata: self... | {
"crate": "events",
"file": null,
"file_size": null,
"is_async": false,
"is_pub": true,
"num_enums": null,
"num_structs": null,
"num_tables": null,
"score": 54,
"total_crates": null
} |
fn_clm_events_event_-8069846008937882624 | clm | function | // Repository: hyperswitch
// Crate: events
// Module: crates/events/src/lib
// Inherent implementation for EventContext<T, A>
/// Create an event builder.
pub fn event<D, E: Event<EventType = T, Data = D>>(
&self,
event: E,
) -> EventBuilder<T, A, E, D> {
EventBuilder {
messa... | {
"crate": "events",
"file": null,
"file_size": null,
"is_async": false,
"is_pub": true,
"num_enums": null,
"num_structs": null,
"num_tables": null,
"score": 49,
"total_crates": null
} |
fn_clm_events_key_4298455189869000193 | clm | function | // Repository: hyperswitch
// Crate: events
// Module: crates/events/src/actix
// Implementation of RequestId for EventInfo
fn key(&self) -> String {
"request_id".to_string()
}
| {
"crate": "events",
"file": null,
"file_size": null,
"is_async": false,
"is_pub": false,
"num_enums": null,
"num_structs": null,
"num_tables": null,
"score": 31,
"total_crates": null
} |
fn_clm_events_data_4298455189869000193 | clm | function | // Repository: hyperswitch
// Crate: events
// Module: crates/events/src/actix
// Implementation of RequestId for EventInfo
fn data(&self) -> error_stack::Result<String, crate::EventsError> {
Ok(self.as_hyphenated().to_string())
}
| {
"crate": "events",
"file": null,
"file_size": null,
"is_async": false,
"is_pub": false,
"num_enums": null,
"num_structs": null,
"num_tables": null,
"score": 27,
"total_crates": null
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.