feat(compatibility): add mandates support in stripe compatibility (#897)

Co-authored-by: Sahkal Poddar <sahkal.poddar@juspay.in>
Co-authored-by: Sarthak Soni <sarthak.soni@juspay.in>
Co-authored-by: Sarthak Soni <76486416+Sarthak1799@users.noreply.github.com>
Co-authored-by: Abhishek Marrivagu <abhi.codes10@gmail.com>
This commit is contained in:
Sahkal Poddar
2023-05-08 14:41:27 +05:30
committed by GitHub
parent 982c27fce7
commit 2ba186b7d1
13 changed files with 329 additions and 76 deletions

View File

@ -147,17 +147,17 @@ where
///
/// Extending functionalities of `bytes::Bytes`
///
pub trait BytesExt<T> {
pub trait BytesExt {
///
/// Convert `bytes::Bytes` into type `<T>` using `serde::Deserialize`
///
fn parse_struct<'de>(&'de self, type_name: &str) -> CustomResult<T, errors::ParsingError>
fn parse_struct<'de, T>(&'de self, type_name: &str) -> CustomResult<T, errors::ParsingError>
where
T: Deserialize<'de>;
}
impl<T> BytesExt<T> for bytes::Bytes {
fn parse_struct<'de>(&'de self, _type_name: &str) -> CustomResult<T, errors::ParsingError>
impl BytesExt for bytes::Bytes {
fn parse_struct<'de, T>(&'de self, _type_name: &str) -> CustomResult<T, errors::ParsingError>
where
T: Deserialize<'de>,
{