mirror of
				https://github.com/juspay/hyperswitch.git
				synced 2025-10-31 18:17:13 +08:00 
			
		
		
		
	feat: encryption service integration to support batch encryption and decryption (#5164)
Co-authored-by: dracarys18 <karthikey.hegde@juspay.in> Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
This commit is contained in:
		
							
								
								
									
										15
									
								
								crates/common_utils/src/transformers.rs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								crates/common_utils/src/transformers.rs
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,15 @@ | ||||
| //! Utilities for converting between foreign types | ||||
|  | ||||
| /// Trait for converting from one foreign type to another | ||||
| pub trait ForeignFrom<F> { | ||||
|     /// Convert from a foreign type to the current type | ||||
|     fn foreign_from(from: F) -> Self; | ||||
| } | ||||
|  | ||||
| /// Trait for converting from one foreign type to another | ||||
| pub trait ForeignTryFrom<F>: Sized { | ||||
|     /// Custom error for conversion failure | ||||
|     type Error; | ||||
|     /// Convert from a foreign type to the current type and return an error if the conversion fails | ||||
|     fn foreign_try_from(from: F) -> Result<Self, Self::Error>; | ||||
| } | ||||
		Reference in New Issue
	
	Block a user
	 Arjun Karthik
					Arjun Karthik