Add importer for CAMT exports by BW Bank

korrat
May 26, 2024, 5:11 PM
YNK6C2RECIWGFCG3CFWDTEQHJZ3LIRHX6IZFZ3XF65ABQEBVSELQC

Dependencies

  • [2] YAGBZPDV Reformat source code
  • [3] 35ULRDIU Add missing file
  • [4] MDFNA7OG Generate and pretty print a random ledger
  • [5] D6UTHZA4 add a simple writer for saving a set of directives to a tree of files
  • [6] WS3UUOV3 Extract commodity type into separate crate
  • [7] A35XMWPS Restructure workspace
  • [8] UESS5YZE migrate dependencies into workspace manifest
  • [9] TSSWMQVU Change date format for Amazon order history importer
  • [10] MSGK44CS Refactor ImporterProtocol to pass buffers
  • [11] R5K55SCB Move tagging of directives with source to framework runner
  • [12] VAB7OPBL Fix codegen for iso20022-parser
  • [13] ZVTVMOZQ Upgrade dependencies
  • [14] QNGOXZL4 Add a basic framework
  • [15] 4WYI5U7Y Upgrade dependencies
  • [16] TB2QGHXN Upgrade dependencies
  • [17] DOIOLZA6 Adapt codegen of iso20022 parser
  • [18] 7URE4HPL Add an importer for DKB account statements
  • [19] 4XK34NNI Add some information on why a file was rejected to header parsing
  • [20] MDRERLJH Upgrade dependencies
  • [21] QRIJE4AQ add a simple pretty printer for beancount directives
  • [22] HFKQ4E7I Upgrade dependencies
  • [23] 2Z4EGCWQ Update dependencies
  • [24] KB7Y4PJI Implement importers for Amazon accounts
  • [25] YDK6X6PP add a library of important types for beancount
  • [26] ATISDQDC Fix a warning
  • [27] R7S2CWF7 Add type for account segments
  • [28] RI7HQBYA Add generator and parser for ISO20022 messages
  • [29] WACJFE2G Fix clippy warning in generated code
  • [30] Y4NE5FDI Redact backtraces in insta tests
  • [31] 72AIO2FZ Upgrade dependencies
  • [32] NSWL54NM allow deriving pretty printing config from a set of directives
  • [33] BDLVPDJZ Add a importer account for BW bank portfolios
  • [34] 24CCPM5O Update dependencies
  • [35] DLCCZFNX Extend generator for iso20022-parser to cover external bank transaction codes
  • [36] PWHXDFPW Rename importer
  • [37] YR6ZR5KO Extract cost spec information into separate crate
  • [38] PCHAKXNM Add an importer for Fidor account statements
  • [39] 5S4MZHL5 pretty print decimals using icu
  • [*] 6MR76MLL Replace build script with cargo-px
  • [*] I2P2FTLE add basic parser for german decimals
  • [*] E2DDQ4MX Define inheritable lints configuration
  • [*] VKESX6YB Update generation of ICU data

Change contents

  • file deletion: external_bank_transaction_codes.rs (----------)
    [5.912708][5.918257:918315](),[5.918315][5.916494:916494]()
    use crate::parser::XmlReader;
    use crate::XmlResult;
    use quick_xml::events::BytesStart;
    }
    pub(crate) fn parse(reader: &mut XmlReader<'a>, _start: &BytesStart<'_>) -> XmlResult<Self> {
    let value = match &*reader.expect_text()? {
    };
    }
    }
    #[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
    #[doc = "Specifies the bank transaction code family, as published in an external bank transaction code family code list.\r\nExternal code sets can be downloaded from www.iso20022.org."]
    pub enum ExternalBankTransactionFamily1Code {
    }
    impl<'a> ExternalBankTransactionFamily1Code {
    pub(crate) fn parse(reader: &mut XmlReader<'a>, _start: &BytesStart<'_>) -> XmlResult<Self> {
    let value = match &*reader.expect_text()? {
    };
    Ok(value)
    }
    }
    Any,
    }
    pub(crate) fn parse(reader: &mut XmlReader<'a>, _start: &BytesStart<'_>) -> XmlResult<Self> {
    let value = match &*reader.expect_text()? {
    };
    Ok(value)
    }
    }
    _ => Self::Any,
    impl<'a> ExternalBankTransactionSubFamily1Code {
    #[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
    #[doc = "Specifies the bank transaction code sub-family, as published in an external bank transaction code sub-family code list.\r\nExternal code sets can be downloaded from www.iso20022.org."]
    pub enum ExternalBankTransactionSubFamily1Code {
    "ACCB" => Self::AccountBalancing,
    "CAPL" => Self::CashPooling,
    "LFUT" => Self::ListedDerivativesFutures,
    "LOPT" => Self::ListedDerivativesOptions,
    "OBND" => Self::OtcDerivativesBonds,
    "OCRD" => Self::OtcDerivativesCreditDerivatives,
    "OEQT" => Self::OtcDerivativesEquity,
    "OIRT" => Self::OtcDerivativesInterestRates,
    "OSED" => Self::OtcDerivativesStructuredExoticDerivatives,
    "OSWP" => Self::OtcDerivativesSwaps,
    "FWRD" => Self::Forwards,
    "FTUR" => Self::Futures,
    "NDFX" => Self::NonDeliverable,
    "SPOT" => Self::Spots,
    "SWAP" => Self::Swaps,
    "MCOP" => Self::MiscellaneousCreditOperations,
    "MDOP" => Self::MiscellaneousDebitOperations,
    "NTAV" => Self::NotAvailable,
    "OTHR" => Self::Other,
    "CSLN" => Self::ConsumerLoans,
    "FTDP" => Self::FixedTermDeposits,
    "FTLN" => Self::FixedTermLoans,
    "MGLN" => Self::MortgageLoans,
    "NTDP" => Self::NoticeDeposits,
    "NTLN" => Self::NoticeLoans,
    "SYDN" => Self::Syndications,
    "CNTR" => Self::CounterTransactions,
    "CCRD" => Self::CustomerCardTransactions,
    "DRFT" => Self::Drafts,
    "ICCN" => Self::IssuedCashConcentrationTransactions,
    "ICHQ" => Self::IssuedCheques,
    "ICDT" => Self::IssuedCreditTransfers,
    "IDDT" => Self::IssuedDirectDebits,
    "IRCT" => Self::IssuedRealTimeCreditTransfers,
    "LBOX" => Self::LockboxTransactions,
    "MCRD" => Self::MerchantCardTransactions,
    "RCCN" => Self::ReceivedCashConcentrationTransactions,
    "RCHQ" => Self::ReceivedCheques,
    "RCDT" => Self::ReceivedCreditTransfers,
    "RDDT" => Self::ReceivedDirectDebits,
    "RRCT" => Self::ReceivedRealTimeCreditTransfers,
    code => panic!("unhandled code: {code:?}"),
    // Cash Management
    AccountBalancing,
    CashPooling,
    // Derivatives
    ListedDerivativesFutures,
    ListedDerivativesOptions,
    OtcDerivativesBonds,
    OtcDerivativesCreditDerivatives,
    OtcDerivativesEquity,
    OtcDerivativesInterestRates,
    OtcDerivativesStructuredExoticDerivatives,
    OtcDerivativesSwaps,
    // Foreign Exchange
    Forwards,
    Futures,
    NonDeliverable,
    Spots,
    Swaps,
    // Generic
    MiscellaneousCreditOperations,
    MiscellaneousDebitOperations,
    NotAvailable,
    Other,
    // Loans, Deposits & Syndication
    ConsumerLoans,
    FixedTermDeposits,
    FixedTermLoans,
    MortgageLoans,
    NoticeDeposits,
    NoticeLoans,
    Syndications,
    // Payments
    CounterTransactions,
    CustomerCardTransactions,
    Drafts,
    IssuedCashConcentrationTransactions,
    IssuedCheques,
    IssuedCreditTransfers,
    IssuedDirectDebits,
    IssuedRealTimeCreditTransfers,
    LockboxTransactions,
    MerchantCardTransactions,
    ReceivedCashConcentrationTransactions,
    ReceivedCheques,
    ReceivedCreditTransfers,
    ReceivedDirectDebits,
    ReceivedRealTimeCreditTransfers,
    // Precious Metal
    Options,
    Delivery,
    Ok(value)
    "ACMT" => Self::AccountManagement,
    "CAMT" => Self::CashManagement,
    "CMDT" => Self::Commodities,
    "DERV" => Self::Derivatives,
    "XTND" => Self::ExtendedDomain,
    "FORX" => Self::ForeignExchange,
    "LDAS" => Self::LoansDepositsSyndications,
    "PMNT" => Self::Payments,
    "PMET" => Self::PreciousMetal,
    "SECU" => Self::Securities,
    "TRAD" => Self::TradeServices,
    tag => todo!("handle tag {tag:?}"),
    impl<'a> ExternalBankTransactionDomain1Code {
    #[derive(Clone, Debug, Eq, Hash, PartialEq)]
    #[doc = "Specifies the bank transaction code domain, as published in an external bank transaction code domain code list.\r\nExternal code sets can be downloaded from www.iso20022.org."]
    pub enum ExternalBankTransactionDomain1Code {
    AccountManagement,
    CashManagement,
    Commodities,
    Derivatives,
    ExtendedDomain,
    ForeignExchange,
    LoansDepositsSyndications,
    Payments,
    PreciousMetal,
    Securities,
    TradeServices,
  • edit in parsers/iso20022-parser/src/types/manual.rs at line 16
    [5.913028]
    [5.913028]
    use time::Date;
  • replacement in parsers/iso20022-parser/src/types/manual.rs at line 20
    [5.913096][5.913096:913131]()
    pub struct CurrencyCode(Currency);
    [5.913096]
    [5.913131]
    pub struct CurrencyCode(pub Currency);
  • replacement in parsers/iso20022-parser/src/types/manual.rs at line 65
    [5.914253][5.914253:914286]()
    pub struct IbanIdentifier(Iban);
    [5.914253]
    [5.914286]
    pub struct IbanIdentifier(pub Iban);
  • edit in parsers/iso20022-parser/src/types/manual.rs at line 200
    [5.916458]
    impl super::DateAndDateTime2Choice {
    pub fn date(&self) -> Date {
    match self {
    super::DateAndDateTime2Choice::Date(dt) => dt.0,
    super::DateAndDateTime2Choice::DateTime(dt) => dt.0.date(),
    }
    }
    }
  • file addition: bank_transaction_codes.rs (----------)
    [5.912708]
    use quick_xml::events::BytesStart;
    use crate::parser::XmlReader;
    use crate::XmlError;
    use crate::XmlResult;
    #[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
    pub enum ExternalBankTransactionDomain1Code {
    ///Precious Metal
    PMET,
    ///Extended Domain
    XTND,
    ///Loans, Deposits & Syndications
    LDAS,
    ///Foreign Exchange
    FORX,
    ///Account Management
    ACMT,
    ///Derivatives
    DERV,
    ///Cash Management
    CAMT,
    ///Securities
    SECU,
    ///Trade Services
    TRAD,
    ///Commodities
    CMDT,
    ///Payments
    PMNT,
    }
    impl<'a> ExternalBankTransactionDomain1Code {
    pub(crate) fn parse(
    reader: &mut XmlReader<'a>,
    _start: &BytesStart<'_>,
    ) -> XmlResult<Self> {
    let value = match &*reader.expect_text()? {
    "PMET" => Self::PMET,
    "XTND" => Self::XTND,
    "LDAS" => Self::LDAS,
    "FORX" => Self::FORX,
    "ACMT" => Self::ACMT,
    "DERV" => Self::DERV,
    "CAMT" => Self::CAMT,
    "SECU" => Self::SECU,
    "TRAD" => Self::TRAD,
    "CMDT" => Self::CMDT,
    "PMNT" => Self::PMNT,
    tag => todo!("unknown tag {tag:?}"),
    };
    Ok(value)
    }
    }
    impl ::core::fmt::Display for ExternalBankTransactionDomain1Code {
    fn fmt(&self, f: &mut core::fmt::Formatter) -> ::core::fmt::Result {
    f.write_str(
    match self {
    Self::PMET => "Precious Metal",
    Self::XTND => "Extended Domain",
    Self::LDAS => "Loans, Deposits & Syndications",
    Self::FORX => "Foreign Exchange",
    Self::ACMT => "Account Management",
    Self::DERV => "Derivatives",
    Self::CAMT => "Cash Management",
    Self::SECU => "Securities",
    Self::TRAD => "Trade Services",
    Self::CMDT => "Commodities",
    Self::PMNT => "Payments",
    },
    )
    }
    }
    #[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
    pub enum ExternalBankTransactionFamily1Code {
    ///OTC Derivatives - Credit
    OCRD,
    ///OTC Derivatives - Bonds
    OBND,
    ///Issued Real-Time Credit Transfers
    IRCT,
    ///Corporate Action
    CORP,
    ///CSD Blocked transactions
    OTHB,
    ///Custody Collection
    COLC,
    ///Futures
    FTUR,
    ///Consumer Loans
    CSLN,
    ///Received Cash Concentration Transactions
    RCCN,
    ///Clean Collection
    CLNC,
    ///Merchant Card Transactions
    MCRD,
    ///Other
    OTHR,
    ///Collateral Management
    COLL,
    ///Trade, Clearing and Settlement
    SETT,
    ///Spots
    SPOT,
    ///Blocked Transactions
    BLOC,
    ///Swaps
    SWAP,
    ///Received Credit Transfers
    RCDT,
    ///Non Settled
    NSET,
    ///Drafts
    DRFT,
    ///Customer Card Transactions
    CCRD,
    ///Fixed Term Loans
    FTLN,
    ///Issued Credit Transfers
    ICDT,
    ///Additional Miscellaneous Credit Operations
    ACOP,
    ///Miscellaneous Debit Operations
    MDOP,
    ///Documentary Credit
    DCCT,
    ///Counter Transactions
    CNTR,
    ///OTC Derivatives - Equity
    OEQT,
    ///Notice Loans
    NTLN,
    ///Issued Cash Concentration Transactions
    ICCN,
    ///Notice Deposits
    NTDP,
    ///Received Cheques
    RCHQ,
    ///Additional Miscellaneous Debit Operations
    ADOP,
    ///Delivery
    DLVR,
    ///Forwards
    FWRD,
    ///Miscellaneous Credit Operations
    MCOP,
    ///Options
    OPTN,
    ///Listed Derivatives - Futures
    LFUT,
    ///Received Real-Time Credit Transfers
    RRCT,
    ///Non Deliverable
    NDFX,
    ///OTC Derivatives - Structured Exotic Derivatives
    OSED,
    ///Account Balancing
    ACCB,
    ///Cash Pooling
    CAPL,
    ///Received Direct Debits
    RDDT,
    ///Opening & Closing
    OPCL,
    ///Stand-By Letter Of Credit
    LOCT,
    ///Lack
    LACK,
    ///Guarantees
    GUAR,
    ///OTC Derivatives – Swaps
    OSWP,
    ///Not Available
    NTAV,
    ///Listed Derivatives - Options
    LOPT,
    ///Syndications
    SYDN,
    ///Issued Direct Debits
    IDDT,
    ///Custody
    CUST,
    ///OTC Derivatives - Interest Rates
    OIRT,
    ///Mortgage Loans
    MGLN,
    ///Issued Cheques
    ICHQ,
    ///Lockbox Transactions
    LBOX,
    ///Documentary Collection
    DOCC,
    ///Fixed Term Deposits
    FTDP,
    ///Miscellaneous Securities Operations
    CASH,
    }
    impl<'a> ExternalBankTransactionFamily1Code {
    pub(crate) fn parse(
    reader: &mut XmlReader<'a>,
    _start: &BytesStart<'_>,
    ) -> XmlResult<Self> {
    let value = match &*reader.expect_text()? {
    "OCRD" => Self::OCRD,
    "OBND" => Self::OBND,
    "IRCT" => Self::IRCT,
    "CORP" => Self::CORP,
    "OTHB" => Self::OTHB,
    "COLC" => Self::COLC,
    "FTUR" => Self::FTUR,
    "CSLN" => Self::CSLN,
    "RCCN" => Self::RCCN,
    "CLNC" => Self::CLNC,
    "MCRD" => Self::MCRD,
    "OTHR" => Self::OTHR,
    "COLL" => Self::COLL,
    "SETT" => Self::SETT,
    "SPOT" => Self::SPOT,
    "BLOC" => Self::BLOC,
    "SWAP" => Self::SWAP,
    "RCDT" => Self::RCDT,
    "NSET" => Self::NSET,
    "DRFT" => Self::DRFT,
    "CCRD" => Self::CCRD,
    "FTLN" => Self::FTLN,
    "ICDT" => Self::ICDT,
    "ACOP" => Self::ACOP,
    "MDOP" => Self::MDOP,
    "DCCT" => Self::DCCT,
    "CNTR" => Self::CNTR,
    "OEQT" => Self::OEQT,
    "NTLN" => Self::NTLN,
    "ICCN" => Self::ICCN,
    "NTDP" => Self::NTDP,
    "RCHQ" => Self::RCHQ,
    "ADOP" => Self::ADOP,
    "DLVR" => Self::DLVR,
    "FWRD" => Self::FWRD,
    "MCOP" => Self::MCOP,
    "OPTN" => Self::OPTN,
    "LFUT" => Self::LFUT,
    "RRCT" => Self::RRCT,
    "NDFX" => Self::NDFX,
    "OSED" => Self::OSED,
    "ACCB" => Self::ACCB,
    "CAPL" => Self::CAPL,
    "RDDT" => Self::RDDT,
    "OPCL" => Self::OPCL,
    "LOCT" => Self::LOCT,
    "LACK" => Self::LACK,
    "GUAR" => Self::GUAR,
    "OSWP" => Self::OSWP,
    "NTAV" => Self::NTAV,
    "LOPT" => Self::LOPT,
    "SYDN" => Self::SYDN,
    "IDDT" => Self::IDDT,
    "CUST" => Self::CUST,
    "OIRT" => Self::OIRT,
    "MGLN" => Self::MGLN,
    "ICHQ" => Self::ICHQ,
    "LBOX" => Self::LBOX,
    "DOCC" => Self::DOCC,
    "FTDP" => Self::FTDP,
    "CASH" => Self::CASH,
    tag => todo!("unknown tag {tag:?}"),
    };
    Ok(value)
    }
    }
    impl ::core::fmt::Display for ExternalBankTransactionFamily1Code {
    fn fmt(&self, f: &mut core::fmt::Formatter) -> ::core::fmt::Result {
    f.write_str(
    match self {
    Self::OCRD => "OTC Derivatives - Credit",
    Self::OBND => "OTC Derivatives - Bonds",
    Self::IRCT => "Issued Real-Time Credit Transfers",
    Self::CORP => "Corporate Action",
    Self::OTHB => "CSD Blocked transactions",
    Self::COLC => "Custody Collection",
    Self::FTUR => "Futures",
    Self::CSLN => "Consumer Loans",
    Self::RCCN => "Received Cash Concentration Transactions",
    Self::CLNC => "Clean Collection",
    Self::MCRD => "Merchant Card Transactions",
    Self::OTHR => "Other",
    Self::COLL => "Collateral Management",
    Self::SETT => "Trade, Clearing and Settlement",
    Self::SPOT => "Spots",
    Self::BLOC => "Blocked Transactions",
    Self::SWAP => "Swaps",
    Self::RCDT => "Received Credit Transfers",
    Self::NSET => "Non Settled",
    Self::DRFT => "Drafts",
    Self::CCRD => "Customer Card Transactions",
    Self::FTLN => "Fixed Term Loans",
    Self::ICDT => "Issued Credit Transfers",
    Self::ACOP => "Additional Miscellaneous Credit Operations",
    Self::MDOP => "Miscellaneous Debit Operations",
    Self::DCCT => "Documentary Credit",
    Self::CNTR => "Counter Transactions",
    Self::OEQT => "OTC Derivatives - Equity",
    Self::NTLN => "Notice Loans",
    Self::ICCN => "Issued Cash Concentration Transactions",
    Self::NTDP => "Notice Deposits",
    Self::RCHQ => "Received Cheques",
    Self::ADOP => "Additional Miscellaneous Debit Operations",
    Self::DLVR => "Delivery",
    Self::FWRD => "Forwards",
    Self::MCOP => "Miscellaneous Credit Operations",
    Self::OPTN => "Options",
    Self::LFUT => "Listed Derivatives - Futures",
    Self::RRCT => "Received Real-Time Credit Transfers",
    Self::NDFX => "Non Deliverable",
    Self::OSED => "OTC Derivatives - Structured Exotic Derivatives",
    Self::ACCB => "Account Balancing",
    Self::CAPL => "Cash Pooling",
    Self::RDDT => "Received Direct Debits",
    Self::OPCL => "Opening & Closing",
    Self::LOCT => "Stand-By Letter Of Credit",
    Self::LACK => "Lack",
    Self::GUAR => "Guarantees",
    Self::OSWP => "OTC Derivatives – Swaps",
    Self::NTAV => "Not Available",
    Self::LOPT => "Listed Derivatives - Options",
    Self::SYDN => "Syndications",
    Self::IDDT => "Issued Direct Debits",
    Self::CUST => "Custody",
    Self::OIRT => "OTC Derivatives - Interest Rates",
    Self::MGLN => "Mortgage Loans",
    Self::ICHQ => "Issued Cheques",
    Self::LBOX => "Lockbox Transactions",
    Self::DOCC => "Documentary Collection",
    Self::FTDP => "Fixed Term Deposits",
    Self::CASH => "Miscellaneous Securities Operations",
    },
    )
    }
    }
    #[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
    pub enum ExternalBankTransactionSubFamily1Code {
    ///Non Taxable Commissions (Generic)
    COMT,
    ///Client Owned Collateral
    SWCC,
    ///Branch Deposit
    BCDP,
    ///Mixed Deposit
    MIXD,
    ///Travellers Cheques Withdrawal
    TCWD,
    ///Exchange
    EXOF,
    ///Pre-Authorised Direct Debit
    PADD,
    ///Credit Adjustment
    LBCA,
    ///Branch Withdrawl
    BCWD,
    ///Call On Intermediate Securities
    EXRI,
    ///Final Maturity
    REDM,
    ///Cross-Border Cash Withdrawal
    XBCW,
    ///Drawing
    DRAW,
    ///Charge/Fees
    CHAR,
    ///Depositary Receipt Issue
    ISSU,
    ///Placement
    PLAC,
    ///Fees (Generic)
    FEES,
    ///Settlement After Collection
    STAC,
    ///Foreign Cheque Under Reserve
    XRCQ,
    ///Conversion
    CONV,
    ///Portfolio Move
    PORT,
    ///OTC Option Segregated Client Cash Collateral
    OPSC,
    ///Controlled Disbursement
    DSBR,
    ///Branch Account Transfer
    BACT,
    ///Treasury Tax And Loan Service
    TTLS,
    ///Corporate Mark Broker Owned
    CMBO,
    ///Transfer In
    TRIN,
    ///Other
    OTHR,
    ///Non Presented Circular Cheques
    NPCC,
    ///Controlled Disbursement
    CDIS,
    ///External Account Transfer
    OWNE,
    ///CCP Cleared Segregated Initial Margin
    CCSM,
    ///Subscription Savings Plan
    SSPL,
    ///Account Closing
    ACCC,
    ///Margin Payments
    MARG,
    ///Discounted Draft
    DDFT,
    ///Settlement Against Bank Guarantee
    SABG,
    ///Account Transfer
    ACCT,
    ///Corporate Rebate
    CPRB,
    ///Certified Customer Cheque
    CCCH,
    ///Trade
    TRAD,
    ///Reversal Due To Payment Return
    RRTN,
    ///Cross-Border Payroll/Salary Payment
    XBSA,
    ///Foreign Currencies Withdrawal
    FCWD,
    ///Float Adjustment
    FLTA,
    ///Mortgage Back Segregated Broker Cash Collateral
    MBSB,
    ///Capital Gains Distribution
    CAPG,
    ///Cheque Reversal
    CQRV,
    ///Cash In Lieu
    CSLI,
    ///Client owned collateral Short Sale
    SHCC,
    ///Settlement Of Sight Export Document
    SOSE,
    ///One-Off Direct Debit
    OODD,
    ///Broker owned collateral Short Sale
    SHBC,
    ///Subscription
    SUBS,
    ///Miscellaneous Deposit
    MSCD,
    ///TBA closing
    TBAC,
    ///Withholding Tax
    WITH,
    ///Lending Income
    ERWA,
    ///Management Fees
    MNFE,
    ///ACH Pre-Authorised
    APAC,
    ///Reversal Due To Return/Unpaid Direct Debit
    UPDD,
    ///Deposit
    DPST,
    ///Margin Client Owned Cash Collateral
    MGCC,
    ///Order Cheque
    ORCQ,
    ///Smart-Card Payment
    SMRT,
    ///Decrease in Value
    DECR,
    ///Sell Buy Back
    BSBC,
    ///ARP Debit
    ARPD,
    ///Bank Cheque 
    BCHQ,
    ///Lending Broker Owned Cash Collateral
    SLBC,
    ///Principal Pay-down/pay-up
    PRUD,
    ///Cash Letter
    CASH,
    ///Unpaid Cheque
    UPCQ,
    ///Inspeci/Share Exchange
    INSP,
    ///Partial Redemption With Reduction Of Nominal Value
    PCAL,
    ///Repo client owned collateral
    RPCC,
    ///Securities Borrowing
    SECB,
    ///Credit DefaultSwap
    CRDS,
    ///Bill of Exchange Settlement on Demand
    STOD,
    ///Securities Cross Products
    SCRP,
    ///SecuredLoan
    SLOA,
    ///Crossed Cheque
    CRCQ,
    ///Settlement At Maturity
    STAM,
    ///Internal Account Transfer
    OWNI,
    ///Debit Adjustments (Generic)
    DAJT,
    ///Foreign Cheque
    XBCQ,
    ///ISDA/CSA Segregated Broker Cash Collateral
    SWSB,
    ///Credit Line
    CRTL,
    ///Priority Credit Transfer
    PRCT,
    ///Charges (Generic)
    CHRG,
    ///Commission Excluding Taxes (Generic)
    COME,
    ///Forwards Broker Owned Collateral
    FWBC,
    ///OTC
    OTCG,
    ///Factor Update
    FCTA,
    ///ACH Corporate Trade
    ACOR,
    ///Upfront Payment
    SWUF,
    ///Swap Broker Owned Collateral
    SWBC,
    ///Bi-lateral Repo Segregated Broker Cash Collateral
    RPSB,
    ///Zero Balancing
    ZABA,
    ///YTD Adjustment
    YTDA,
    ///Travellers Cheques Deposit
    TCDP,
    ///Settlement Under Reserve
    STLR,
    ///Bonus Issue/Capitalisation Issue
    BONU,
    ///ACH Credit
    ACDT,
    ///Swap Payment
    SWAP,
    ///Cash Deposit
    CDPT,
    ///Dishonoured/Unpaid Draft
    UDFT,
    ///TBA Broker owned cash collateral
    TBBC,
    ///Forwards Client Owned Collateral
    FWCC,
    ///Point-of-Sale (POS) Payment - Debit Card
    POSD,
    ///OTC Non-CCP
    OTCN,
    ///Deposit/Contribution
    GEN2,
    ///Commission Including Taxes (Generic)
    COMI,
    ///Single Currency IRS
    SCIR,
    ///Single Currency IRS Exotic
    SCIE,
    ///Bi-lateral repo broker owned collateral
    RPBC,
    ///Rights Issue/Subscription Rights/Rights Offer
    RHTS,
    ///OTC Derivatives
    OTCD,
    ///Debit
    LBDB,
    ///Exotic Option
    EXPT,
    ///Dividend Option
    DVOP,
    ///Withdrawal/Distribution
    GEN1,
    ///Swaption
    SWPT,
    ///Redemption/Withdrawal
    RWPL,
    ///Reset Payment
    SWRS,
    ///Cross-Border Credit Transfer
    XBCT,
    ///Reversal due to a Cover Transaction Return
    RCOV,
    ///Smart-Card Payment
    SMCD,
    ///Cross-Border Direct Debit
    XBDD,
    ///CCP Cleared Initial Margin
    CCPC,
    ///Exchange Traded Derivatives
    EXTD,
    ///Tender
    TEND,
    ///Securities Lending
    SECL,
    ///Direct Debit Under Reserve
    URDD,
    ///Repo
    REPU,
    ///Securities Lending And Borrowing
    SLEB,
    ///Future Variation Margin
    FUTU,
    ///MFA Segregated Client Cash Collateral
    FWSC,
    ///Reversal Due To Payment Reversal
    PRDD,
    ///OTC CCP
    OTCC,
    ///Cross Trade
    CROS,
    ///Cash Letter Adjustment
    CSHA,
    ///Posting Error
    PSTE,
    ///Initial Futures Margin Segregated Client Cash Collateral
    MGSC,
    ///CCP Cleared Variation Margin
    CCPM,
    ///Priority Issue
    PRIO,
    ///Automatic Transfer
    AUTT,
    ///Put Redemption
    BPUT,
    ///Triparty Repo
    TRPO,
    ///Pair-Off
    PAIR,
    ///SEPA B2B Direct Debit
    BBDD,
    ///Cash Dividend
    DVCA,
    ///Financial Institution Direct Debit Payment
    FIDD,
    ///Exchange Traded
    XCHG,
    ///Bond Forward
    BFWD,
    ///Redemption Asset Allocation
    REAA,
    ///Payroll/Salary Payment
    SALA,
    ///Odd Lot Sale/Purchase
    ODLT,
    ///Principal Payment
    PPAY,
    ///Credit Adjustments (Generic)
    CAJT,
    ///Syndicated
    SYND,
    ///Same Day Value Credit Transfer
    SDVA,
    ///Commission (Generic)
    COMM,
    ///Reverse Repurchase Agreement
    RVPO,
    ///Internal Book Transfer
    BOOK,
    ///Interests (Generic)
    INTR,
    ///Lending Client Owned Cash Collateral
    SLCC,
    ///Overdraft
    ODFT,
    ///Open Cheque
    OPCQ,
    ///Bi-lateral Repo Segregated Client Cash Collateral
    RPSC,
    ///Interest Payment with Principles
    PRII,
    ///Foreign Currencies Deposit
    FCDP,
    ///Cheque
    CCHQ,
    ///Fixed Deposit Interest Amount
    INFD,
    ///Reversal Due To Payment Cancellation Request
    RCDD,
    ///Cross-Border Credit Card Payment
    XBCP,
    ///Invoice Accepted with Differed Due Date
    IADD,
    ///Domestic Credit Transfer
    DMCT,
    ///Transaction Fees
    TRFE,
    ///Cheque Under Reserve
    URCQ,
    ///Reversal Due To Payment Cancellation Request
    RPCR,
    ///Credit Card Payment
    POSC,
    ///Turnaround
    TURN,
    ///Equity Mark Client Owned
    EQCO,
    ///Partial Redemption Without Reduction Of Nominal Value
    PRED,
    ///Cross-Border Intra Company Transfer
    XICT,
    ///Switch
    SWIC,
    ///Back Value
    BCKV,
    ///Corporate Own Account Transfer
    COAT,
    ///Final Payment
    SWFP,
    ///ACH Settlement
    ASET,
    ///ACH Transaction
    ATXN,
    ///Credit Transfer With Agreed Commercial Information
    VCOM,
    ///Option Client Owned Collateral
    OPCC,
    ///Futures Commission
    FUCO,
    ///Non Syndicated
    NSYN,
    ///Treasury Cross Product
    TRCP,
    ///Nordic Payment Council Credit Transfer
    ENCT,
    ///Direct Debit Payment
    PMDD,
    ///Financial Institution Credit Transfer
    FICT,
    ///Equity Mark Broker Owned
    EQBO,
    ///Cross-Border
    XBRD,
    ///New issue distribution
    NWID,
    ///ACH Debit
    ADBT,
    ///Triparty Reverse Repo
    TRVO,
    ///Cash Penalties
    CPEN,
    ///Client owned OCC pledged collateral
    OCCC,
    ///Warrant Exercise/Warrant Conversion
    EXWA,
    ///Topping
    TOPG,
    ///Reimbursement (Generic)
    RIMB,
    ///Securities Buy Sell Sell Buy Back
    SBSC,
    ///Buy Sell Back
    BSBO,
    ///Repayment
    RPMT,
    ///Repurchase Offer/Issuer Bid/Reverse Rights.
    BIDS,
    ///Exchange Rate Adjustment
    ERTA,
    ///Freeze Of Funds
    FRZF,
    ///Overdraft Charge
    OVCH,
    ///Renewal
    RNEW,
    ///Borrowing Fee
    ERWI,
    ///To Be Announced
    TBAS,
    ///Brokerage Fee
    BROK,
    ///Drawdown
    DDWN,
    ///Cash Withdrawal
    CWDL,
    ///Intra Company Transfer
    ICCT,
    ///Cover Transaction
    COVE,
    ///Dividend Reinvestment
    DRIP,
    ///Liquidation Dividend / Liquidation Payment
    LIQU,
    ///ACH Concentration
    ACON,
    ///Netting
    NETT,
    ///Equity Premium Reserve
    SHPR,
    ///Transfer Out
    TOUT,
    ///ACH Return
    ARET,
    ///Draft Maturity Change
    DMCG,
    ///Fixed Income
    FIXI,
    ///Credit Support
    CRSP,
    ///Taxes (Generic)
    TAXE,
    ///Point-of-Sale (POS) Payment
    POSP,
    ///Adjustments (Generic)
    ADJT,
    ///Full Call / Early Redemption
    MCAL,
    ///OTC Option Segregated Broker Cash Collateral
    OPSB,
    ///Equity Swap
    EQUS,
    ///Cross Border Reversal Due to Payment Return
    XRTN,
    ///Bank Fees
    BKFE,
    ///Unpaid Foreign Cheque
    XPCQ,
    ///Short Sell
    SHSL,
    ///Standing Order
    STDO,
    ///Merger
    MRGR,
    ///Partial Payment
    SWPP,
    ///Futures Residual Amount
    RESI,
    ///Tax Reclaim
    TREC,
    ///Financial Institution Own Account Transfer
    FIOA,
    ///Cross Product
    CRPR,
    ///Value Date
    VALD,
    ///Mortgage Back Segregated Client Cash Collateral
    MBSC,
    ///FX Option
    OPTN,
    ///Account Opening
    ACCO,
    ///Circular Cheque
    CLCQ,
    ///ISDA/CSA Segregated Client Cash Collateral
    SWSC,
    ///Sweeping
    SWEP,
    ///Dutch Auction
    DTCH,
    ///Compensation/Claims
    CLAI,
    ///MFA Segregated Broker Cash Collateral
    FWSB,
    ///Cross Currency IRS
    CCIR,
    ///ACH Reversal
    AREV,
    ///Interest Payment with Principles
    PRIN,
    ///Settlement Of Sight Import Document
    SOSI,
    ///Cross-Border Standing Order
    XBST,
    ///Exchange Traded CCP
    XCHC,
    ///Settlement
    STLM,
    ///Option Broker Owned Collateral
    OPBC,
    ///Underwriting Commission
    UNCO,
    ///Subscription Asset Allocation
    SUAA,
    ///Not Available
    NTAV,
    ///TBA Client owned cash collateral
    TBCC,
    ///SEPA Core Direct Debit
    ESDD,
    ///Deposit
    LBDP,
    ///SEPA Credit Transfer
    ESCT,
    ///Exchange Traded Non-CCP
    XCHN,
    ///Equity Option
    EQPT,
    ///Check Deposit
    CHKD,
    ///Corporate Mark Client Owned
    CMCO,
    ///Unpaid Card Transaction
    UPCT,
    }
    impl<'a> ExternalBankTransactionSubFamily1Code {
    pub(crate) fn parse(
    reader: &mut XmlReader<'a>,
    _start: &BytesStart<'_>,
    ) -> XmlResult<Self> {
    let value = match &*reader.expect_text()? {
    "COMT" => Self::COMT,
    "SWCC" => Self::SWCC,
    "BCDP" => Self::BCDP,
    "MIXD" => Self::MIXD,
    "TCWD" => Self::TCWD,
    "EXOF" => Self::EXOF,
    "PADD" => Self::PADD,
    "LBCA" => Self::LBCA,
    "BCWD" => Self::BCWD,
    "EXRI" => Self::EXRI,
    "REDM" => Self::REDM,
    "XBCW" => Self::XBCW,
    "DRAW" => Self::DRAW,
    "CHAR" => Self::CHAR,
    "ISSU" => Self::ISSU,
    "PLAC" => Self::PLAC,
    "FEES" => Self::FEES,
    "STAC" => Self::STAC,
    "XRCQ" => Self::XRCQ,
    "CONV" => Self::CONV,
    "PORT" => Self::PORT,
    "OPSC" => Self::OPSC,
    "DSBR" => Self::DSBR,
    "BACT" => Self::BACT,
    "TTLS" => Self::TTLS,
    "CMBO" => Self::CMBO,
    "TRIN" => Self::TRIN,
    "OTHR" => Self::OTHR,
    "NPCC" => Self::NPCC,
    "CDIS" => Self::CDIS,
    "OWNE" => Self::OWNE,
    "CCSM" => Self::CCSM,
    "SSPL" => Self::SSPL,
    "ACCC" => Self::ACCC,
    "MARG" => Self::MARG,
    "DDFT" => Self::DDFT,
    "SABG" => Self::SABG,
    "ACCT" => Self::ACCT,
    "CPRB" => Self::CPRB,
    "CCCH" => Self::CCCH,
    "TRAD" => Self::TRAD,
    "RRTN" => Self::RRTN,
    "XBSA" => Self::XBSA,
    "FCWD" => Self::FCWD,
    "FLTA" => Self::FLTA,
    "MBSB" => Self::MBSB,
    "CAPG" => Self::CAPG,
    "CQRV" => Self::CQRV,
    "CSLI" => Self::CSLI,
    "SHCC" => Self::SHCC,
    "SOSE" => Self::SOSE,
    "OODD" => Self::OODD,
    "SHBC" => Self::SHBC,
    "SUBS" => Self::SUBS,
    "MSCD" => Self::MSCD,
    "TBAC" => Self::TBAC,
    "WITH" => Self::WITH,
    "ERWA" => Self::ERWA,
    "MNFE" => Self::MNFE,
    "APAC" => Self::APAC,
    "UPDD" => Self::UPDD,
    "DPST" => Self::DPST,
    "MGCC" => Self::MGCC,
    "ORCQ" => Self::ORCQ,
    "SMRT" => Self::SMRT,
    "DECR" => Self::DECR,
    "BSBC" => Self::BSBC,
    "ARPD" => Self::ARPD,
    "BCHQ" => Self::BCHQ,
    "SLBC" => Self::SLBC,
    "PRUD" => Self::PRUD,
    "CASH" => Self::CASH,
    "UPCQ" => Self::UPCQ,
    "INSP" => Self::INSP,
    "PCAL" => Self::PCAL,
    "RPCC" => Self::RPCC,
    "SECB" => Self::SECB,
    "CRDS" => Self::CRDS,
    "STOD" => Self::STOD,
    "SCRP" => Self::SCRP,
    "SLOA" => Self::SLOA,
    "CRCQ" => Self::CRCQ,
    "STAM" => Self::STAM,
    "OWNI" => Self::OWNI,
    "DAJT" => Self::DAJT,
    "XBCQ" => Self::XBCQ,
    "SWSB" => Self::SWSB,
    "CRTL" => Self::CRTL,
    "PRCT" => Self::PRCT,
    "CHRG" => Self::CHRG,
    "COME" => Self::COME,
    "FWBC" => Self::FWBC,
    "OTCG" => Self::OTCG,
    "FCTA" => Self::FCTA,
    "ACOR" => Self::ACOR,
    "SWUF" => Self::SWUF,
    "SWBC" => Self::SWBC,
    "RPSB" => Self::RPSB,
    "ZABA" => Self::ZABA,
    "YTDA" => Self::YTDA,
    "TCDP" => Self::TCDP,
    "STLR" => Self::STLR,
    "BONU" => Self::BONU,
    "ACDT" => Self::ACDT,
    "SWAP" => Self::SWAP,
    "CDPT" => Self::CDPT,
    "UDFT" => Self::UDFT,
    "TBBC" => Self::TBBC,
    "FWCC" => Self::FWCC,
    "POSD" => Self::POSD,
    "OTCN" => Self::OTCN,
    "GEN2" => Self::GEN2,
    "COMI" => Self::COMI,
    "SCIR" => Self::SCIR,
    "SCIE" => Self::SCIE,
    "RPBC" => Self::RPBC,
    "RHTS" => Self::RHTS,
    "OTCD" => Self::OTCD,
    "LBDB" => Self::LBDB,
    "EXPT" => Self::EXPT,
    "DVOP" => Self::DVOP,
    "GEN1" => Self::GEN1,
    "SWPT" => Self::SWPT,
    "RWPL" => Self::RWPL,
    "SWRS" => Self::SWRS,
    "XBCT" => Self::XBCT,
    "RCOV" => Self::RCOV,
    "SMCD" => Self::SMCD,
    "XBDD" => Self::XBDD,
    "CCPC" => Self::CCPC,
    "EXTD" => Self::EXTD,
    "TEND" => Self::TEND,
    "SECL" => Self::SECL,
    "URDD" => Self::URDD,
    "REPU" => Self::REPU,
    "SLEB" => Self::SLEB,
    "FUTU" => Self::FUTU,
    "FWSC" => Self::FWSC,
    "PRDD" => Self::PRDD,
    "OTCC" => Self::OTCC,
    "CROS" => Self::CROS,
    "CSHA" => Self::CSHA,
    "PSTE" => Self::PSTE,
    "MGSC" => Self::MGSC,
    "CCPM" => Self::CCPM,
    "PRIO" => Self::PRIO,
    "AUTT" => Self::AUTT,
    "BPUT" => Self::BPUT,
    "TRPO" => Self::TRPO,
    "PAIR" => Self::PAIR,
    "BBDD" => Self::BBDD,
    "DVCA" => Self::DVCA,
    "FIDD" => Self::FIDD,
    "XCHG" => Self::XCHG,
    "BFWD" => Self::BFWD,
    "REAA" => Self::REAA,
    "SALA" => Self::SALA,
    "ODLT" => Self::ODLT,
    "PPAY" => Self::PPAY,
    "CAJT" => Self::CAJT,
    "SYND" => Self::SYND,
    "SDVA" => Self::SDVA,
    "COMM" => Self::COMM,
    "RVPO" => Self::RVPO,
    "BOOK" => Self::BOOK,
    "INTR" => Self::INTR,
    "SLCC" => Self::SLCC,
    "ODFT" => Self::ODFT,
    "OPCQ" => Self::OPCQ,
    "RPSC" => Self::RPSC,
    "PRII" => Self::PRII,
    "FCDP" => Self::FCDP,
    "CCHQ" => Self::CCHQ,
    "INFD" => Self::INFD,
    "RCDD" => Self::RCDD,
    "XBCP" => Self::XBCP,
    "IADD" => Self::IADD,
    "DMCT" => Self::DMCT,
    "TRFE" => Self::TRFE,
    "URCQ" => Self::URCQ,
    "RPCR" => Self::RPCR,
    "POSC" => Self::POSC,
    "TURN" => Self::TURN,
    "EQCO" => Self::EQCO,
    "PRED" => Self::PRED,
    "XICT" => Self::XICT,
    "SWIC" => Self::SWIC,
    "BCKV" => Self::BCKV,
    "COAT" => Self::COAT,
    "SWFP" => Self::SWFP,
    "ASET" => Self::ASET,
    "ATXN" => Self::ATXN,
    "VCOM" => Self::VCOM,
    "OPCC" => Self::OPCC,
    "FUCO" => Self::FUCO,
    "NSYN" => Self::NSYN,
    "TRCP" => Self::TRCP,
    "ENCT" => Self::ENCT,
    "PMDD" => Self::PMDD,
    "FICT" => Self::FICT,
    "EQBO" => Self::EQBO,
    "XBRD" => Self::XBRD,
    "NWID" => Self::NWID,
    "ADBT" => Self::ADBT,
    "TRVO" => Self::TRVO,
    "CPEN" => Self::CPEN,
    "OCCC" => Self::OCCC,
    "EXWA" => Self::EXWA,
    "TOPG" => Self::TOPG,
    "RIMB" => Self::RIMB,
    "SBSC" => Self::SBSC,
    "BSBO" => Self::BSBO,
    "RPMT" => Self::RPMT,
    "BIDS" => Self::BIDS,
    "ERTA" => Self::ERTA,
    "FRZF" => Self::FRZF,
    "OVCH" => Self::OVCH,
    "RNEW" => Self::RNEW,
    "ERWI" => Self::ERWI,
    "TBAS" => Self::TBAS,
    "BROK" => Self::BROK,
    "DDWN" => Self::DDWN,
    "CWDL" => Self::CWDL,
    "ICCT" => Self::ICCT,
    "COVE" => Self::COVE,
    "DRIP" => Self::DRIP,
    "LIQU" => Self::LIQU,
    "ACON" => Self::ACON,
    "NETT" => Self::NETT,
    "SHPR" => Self::SHPR,
    "TOUT" => Self::TOUT,
    "ARET" => Self::ARET,
    "DMCG" => Self::DMCG,
    "FIXI" => Self::FIXI,
    "CRSP" => Self::CRSP,
    "TAXE" => Self::TAXE,
    "POSP" => Self::POSP,
    "ADJT" => Self::ADJT,
    "MCAL" => Self::MCAL,
    "OPSB" => Self::OPSB,
    "EQUS" => Self::EQUS,
    "XRTN" => Self::XRTN,
    "BKFE" => Self::BKFE,
    "XPCQ" => Self::XPCQ,
    "SHSL" => Self::SHSL,
    "STDO" => Self::STDO,
    "MRGR" => Self::MRGR,
    "SWPP" => Self::SWPP,
    "RESI" => Self::RESI,
    "TREC" => Self::TREC,
    "FIOA" => Self::FIOA,
    "CRPR" => Self::CRPR,
    "VALD" => Self::VALD,
    "MBSC" => Self::MBSC,
    "OPTN" => Self::OPTN,
    "ACCO" => Self::ACCO,
    "CLCQ" => Self::CLCQ,
    "SWSC" => Self::SWSC,
    "SWEP" => Self::SWEP,
    "DTCH" => Self::DTCH,
    "CLAI" => Self::CLAI,
    "FWSB" => Self::FWSB,
    "CCIR" => Self::CCIR,
    "AREV" => Self::AREV,
    "PRIN" => Self::PRIN,
    "SOSI" => Self::SOSI,
    "XBST" => Self::XBST,
    "XCHC" => Self::XCHC,
    "STLM" => Self::STLM,
    "OPBC" => Self::OPBC,
    "UNCO" => Self::UNCO,
    "SUAA" => Self::SUAA,
    "NTAV" => Self::NTAV,
    "TBCC" => Self::TBCC,
    "ESDD" => Self::ESDD,
    "LBDP" => Self::LBDP,
    "ESCT" => Self::ESCT,
    "XCHN" => Self::XCHN,
    "EQPT" => Self::EQPT,
    "CHKD" => Self::CHKD,
    "CMCO" => Self::CMCO,
    "UPCT" => Self::UPCT,
    tag => todo!("unknown tag {tag:?}"),
    };
    Ok(value)
    }
    }
    impl ::core::fmt::Display for ExternalBankTransactionSubFamily1Code {
    fn fmt(&self, f: &mut core::fmt::Formatter) -> ::core::fmt::Result {
    f.write_str(
    match self {
    Self::COMT => "Non Taxable Commissions (Generic)",
    Self::SWCC => "Client Owned Collateral",
    Self::BCDP => "Branch Deposit",
    Self::MIXD => "Mixed Deposit",
    Self::TCWD => "Travellers Cheques Withdrawal",
    Self::EXOF => "Exchange",
    Self::PADD => "Pre-Authorised Direct Debit",
    Self::LBCA => "Credit Adjustment",
    Self::BCWD => "Branch Withdrawl",
    Self::EXRI => "Call On Intermediate Securities",
    Self::REDM => "Final Maturity",
    Self::XBCW => "Cross-Border Cash Withdrawal",
    Self::DRAW => "Drawing",
    Self::CHAR => "Charge/Fees",
    Self::ISSU => "Depositary Receipt Issue",
    Self::PLAC => "Placement",
    Self::FEES => "Fees (Generic)",
    Self::STAC => "Settlement After Collection",
    Self::XRCQ => "Foreign Cheque Under Reserve",
    Self::CONV => "Conversion",
    Self::PORT => "Portfolio Move",
    Self::OPSC => "OTC Option Segregated Client Cash Collateral",
    Self::DSBR => "Controlled Disbursement",
    Self::BACT => "Branch Account Transfer",
    Self::TTLS => "Treasury Tax And Loan Service",
    Self::CMBO => "Corporate Mark Broker Owned",
    Self::TRIN => "Transfer In",
    Self::OTHR => "Other",
    Self::NPCC => "Non Presented Circular Cheques",
    Self::CDIS => "Controlled Disbursement",
    Self::OWNE => "External Account Transfer",
    Self::CCSM => "CCP Cleared Segregated Initial Margin",
    Self::SSPL => "Subscription Savings Plan",
    Self::ACCC => "Account Closing",
    Self::MARG => "Margin Payments",
    Self::DDFT => "Discounted Draft",
    Self::SABG => "Settlement Against Bank Guarantee",
    Self::ACCT => "Account Transfer",
    Self::CPRB => "Corporate Rebate",
    Self::CCCH => "Certified Customer Cheque",
    Self::TRAD => "Trade",
    Self::RRTN => "Reversal Due To Payment Return",
    Self::XBSA => "Cross-Border Payroll/Salary Payment",
    Self::FCWD => "Foreign Currencies Withdrawal",
    Self::FLTA => "Float Adjustment",
    Self::MBSB => "Mortgage Back Segregated Broker Cash Collateral",
    Self::CAPG => "Capital Gains Distribution",
    Self::CQRV => "Cheque Reversal",
    Self::CSLI => "Cash In Lieu",
    Self::SHCC => "Client owned collateral Short Sale",
    Self::SOSE => "Settlement Of Sight Export Document",
    Self::OODD => "One-Off Direct Debit",
    Self::SHBC => "Broker owned collateral Short Sale",
    Self::SUBS => "Subscription",
    Self::MSCD => "Miscellaneous Deposit",
    Self::TBAC => "TBA closing",
    Self::WITH => "Withholding Tax",
    Self::ERWA => "Lending Income",
    Self::MNFE => "Management Fees",
    Self::APAC => "ACH Pre-Authorised",
    Self::UPDD => "Reversal Due To Return/Unpaid Direct Debit",
    Self::DPST => "Deposit",
    Self::MGCC => "Margin Client Owned Cash Collateral",
    Self::ORCQ => "Order Cheque",
    Self::SMRT => "Smart-Card Payment",
    Self::DECR => "Decrease in Value",
    Self::BSBC => "Sell Buy Back",
    Self::ARPD => "ARP Debit",
    Self::BCHQ => "Bank Cheque\u{a0}",
    Self::SLBC => "Lending Broker Owned Cash Collateral",
    Self::PRUD => "Principal Pay-down/pay-up",
    Self::CASH => "Cash Letter",
    Self::UPCQ => "Unpaid Cheque",
    Self::INSP => "Inspeci/Share Exchange",
    Self::PCAL => "Partial Redemption With Reduction Of Nominal Value",
    Self::RPCC => "Repo client owned collateral",
    Self::SECB => "Securities Borrowing",
    Self::CRDS => "Credit DefaultSwap",
    Self::STOD => "Bill of Exchange Settlement on Demand",
    Self::SCRP => "Securities Cross Products",
    Self::SLOA => "SecuredLoan",
    Self::CRCQ => "Crossed Cheque",
    Self::STAM => "Settlement At Maturity",
    Self::OWNI => "Internal Account Transfer",
    Self::DAJT => "Debit Adjustments (Generic)",
    Self::XBCQ => "Foreign Cheque",
    Self::SWSB => "ISDA/CSA Segregated Broker Cash Collateral",
    Self::CRTL => "Credit Line",
    Self::PRCT => "Priority Credit Transfer",
    Self::CHRG => "Charges (Generic)",
    Self::COME => "Commission Excluding Taxes (Generic)",
    Self::FWBC => "Forwards Broker Owned Collateral",
    Self::OTCG => "OTC",
    Self::FCTA => "Factor Update",
    Self::ACOR => "ACH Corporate Trade",
    Self::SWUF => "Upfront Payment",
    Self::SWBC => "Swap Broker Owned Collateral",
    Self::RPSB => "Bi-lateral Repo Segregated Broker Cash Collateral",
    Self::ZABA => "Zero Balancing",
    Self::YTDA => "YTD Adjustment",
    Self::TCDP => "Travellers Cheques Deposit",
    Self::STLR => "Settlement Under Reserve",
    Self::BONU => "Bonus Issue/Capitalisation Issue",
    Self::ACDT => "ACH Credit",
    Self::SWAP => "Swap Payment",
    Self::CDPT => "Cash Deposit",
    Self::UDFT => "Dishonoured/Unpaid Draft",
    Self::TBBC => "TBA Broker owned cash collateral",
    Self::FWCC => "Forwards Client Owned Collateral",
    Self::POSD => "Point-of-Sale (POS) Payment - Debit Card",
    Self::OTCN => "OTC Non-CCP",
    Self::GEN2 => "Deposit/Contribution",
    Self::COMI => "Commission Including Taxes (Generic)",
    Self::SCIR => "Single Currency IRS",
    Self::SCIE => "Single Currency IRS Exotic",
    Self::RPBC => "Bi-lateral repo broker owned collateral",
    Self::RHTS => "Rights Issue/Subscription Rights/Rights Offer",
    Self::OTCD => "OTC Derivatives",
    Self::LBDB => "Debit",
    Self::EXPT => "Exotic Option",
    Self::DVOP => "Dividend Option",
    Self::GEN1 => "Withdrawal/Distribution",
    Self::SWPT => "Swaption",
    Self::RWPL => "Redemption/Withdrawal",
    Self::SWRS => "Reset Payment",
    Self::XBCT => "Cross-Border Credit Transfer",
    Self::RCOV => "Reversal due to a Cover Transaction Return",
    Self::SMCD => "Smart-Card Payment",
    Self::XBDD => "Cross-Border Direct Debit",
    Self::CCPC => "CCP Cleared Initial Margin",
    Self::EXTD => "Exchange Traded Derivatives",
    Self::TEND => "Tender",
    Self::SECL => "Securities Lending",
    Self::URDD => "Direct Debit Under Reserve",
    Self::REPU => "Repo",
    Self::SLEB => "Securities Lending And Borrowing",
    Self::FUTU => "Future Variation Margin",
    Self::FWSC => "MFA Segregated Client Cash Collateral",
    Self::PRDD => "Reversal Due To Payment Reversal ",
    Self::OTCC => "OTC CCP",
    Self::CROS => "Cross Trade",
    Self::CSHA => "Cash Letter Adjustment",
    Self::PSTE => "Posting Error",
    Self::MGSC => "Initial Futures Margin Segregated Client Cash Collateral",
    Self::CCPM => "CCP Cleared Variation Margin",
    Self::PRIO => "Priority Issue",
    Self::AUTT => "Automatic Transfer",
    Self::BPUT => "Put Redemption",
    Self::TRPO => "Triparty Repo",
    Self::PAIR => "Pair-Off",
    Self::BBDD => "SEPA B2B Direct Debit",
    Self::DVCA => "Cash Dividend",
    Self::FIDD => "Financial Institution Direct Debit Payment",
    Self::XCHG => "Exchange Traded",
    Self::BFWD => "Bond Forward",
    Self::REAA => "Redemption Asset Allocation",
    Self::SALA => "Payroll/Salary Payment",
    Self::ODLT => "Odd Lot Sale/Purchase",
    Self::PPAY => "Principal Payment",
    Self::CAJT => "Credit Adjustments (Generic)",
    Self::SYND => "Syndicated",
    Self::SDVA => "Same Day Value Credit Transfer",
    Self::COMM => "Commission (Generic)",
    Self::RVPO => "Reverse Repurchase Agreement",
    Self::BOOK => "Internal Book Transfer",
    Self::INTR => "Interests (Generic)",
    Self::SLCC => "Lending Client Owned Cash Collateral",
    Self::ODFT => "Overdraft",
    Self::OPCQ => "Open Cheque",
    Self::RPSC => "Bi-lateral Repo Segregated Client Cash Collateral",
    Self::PRII => "Interest Payment with Principles",
    Self::FCDP => "Foreign Currencies Deposit",
    Self::CCHQ => "Cheque",
    Self::INFD => "Fixed Deposit Interest Amount",
    Self::RCDD => "Reversal Due To Payment Cancellation Request",
    Self::XBCP => "Cross-Border Credit Card Payment",
    Self::IADD => "Invoice Accepted with Differed Due Date",
    Self::DMCT => "Domestic Credit Transfer",
    Self::TRFE => "Transaction Fees",
    Self::URCQ => "Cheque Under Reserve",
    Self::RPCR => "Reversal Due To Payment Cancellation Request ",
    Self::POSC => "Credit Card Payment",
    Self::TURN => "Turnaround",
    Self::EQCO => "Equity Mark Client Owned",
    Self::PRED => "Partial Redemption Without Reduction Of Nominal Value",
    Self::XICT => "Cross-Border Intra Company Transfer",
    Self::SWIC => "Switch",
    Self::BCKV => "Back Value",
    Self::COAT => "Corporate Own Account Transfer",
    Self::SWFP => "Final Payment",
    Self::ASET => "ACH Settlement",
    Self::ATXN => "ACH Transaction",
    Self::VCOM => "Credit Transfer With Agreed Commercial Information",
    Self::OPCC => "Option Client Owned Collateral",
    Self::FUCO => "Futures Commission",
    Self::NSYN => "Non Syndicated",
    Self::TRCP => "Treasury Cross Product",
    Self::ENCT => "Nordic Payment Council Credit Transfer",
    Self::PMDD => "Direct Debit Payment",
    Self::FICT => "Financial Institution Credit Transfer",
    Self::EQBO => "Equity Mark Broker Owned",
    Self::XBRD => "Cross-Border",
    Self::NWID => "New issue distribution",
    Self::ADBT => "ACH Debit",
    Self::TRVO => "Triparty Reverse Repo",
    Self::CPEN => "Cash Penalties",
    Self::OCCC => "Client owned OCC pledged collateral",
    Self::EXWA => "Warrant Exercise/Warrant Conversion",
    Self::TOPG => "Topping",
    Self::RIMB => "Reimbursement (Generic)",
    Self::SBSC => "Securities Buy Sell Sell Buy Back",
    Self::BSBO => "Buy Sell Back",
    Self::RPMT => "Repayment",
    Self::BIDS => "Repurchase Offer/Issuer Bid/Reverse Rights.",
    Self::ERTA => "Exchange Rate Adjustment",
    Self::FRZF => "Freeze Of Funds",
    Self::OVCH => "Overdraft Charge",
    Self::RNEW => "Renewal",
    Self::ERWI => "Borrowing Fee",
    Self::TBAS => "To Be Announced",
    Self::BROK => "Brokerage Fee",
    Self::DDWN => "Drawdown",
    Self::CWDL => "Cash Withdrawal",
    Self::ICCT => "Intra Company Transfer",
    Self::COVE => "Cover Transaction ",
    Self::DRIP => "Dividend Reinvestment",
    Self::LIQU => "Liquidation Dividend / Liquidation Payment",
    Self::ACON => "ACH Concentration",
    Self::NETT => "Netting",
    Self::SHPR => "Equity Premium Reserve",
    Self::TOUT => "Transfer Out",
    Self::ARET => "ACH Return",
    Self::DMCG => "Draft Maturity Change",
    Self::FIXI => "Fixed Income",
    Self::CRSP => "Credit Support",
    Self::TAXE => "Taxes (Generic)",
    Self::POSP => "Point-of-Sale (POS) Payment",
    Self::ADJT => "Adjustments (Generic)",
    Self::MCAL => "Full Call / Early Redemption",
    Self::OPSB => "OTC Option Segregated Broker Cash Collateral",
    Self::EQUS => "Equity Swap",
    Self::XRTN => "Cross Border Reversal Due to Payment Return",
    Self::BKFE => "Bank Fees",
    Self::XPCQ => "Unpaid Foreign Cheque",
    Self::SHSL => "Short Sell",
    Self::STDO => "Standing Order",
    Self::MRGR => "Merger",
    Self::SWPP => "Partial Payment",
    Self::RESI => "Futures Residual Amount",
    Self::TREC => "Tax Reclaim",
    Self::FIOA => "Financial Institution Own Account Transfer",
    Self::CRPR => "Cross Product",
    Self::VALD => "Value Date",
    Self::MBSC => "Mortgage Back Segregated Client Cash Collateral",
    Self::OPTN => "FX Option",
    Self::ACCO => "Account Opening",
    Self::CLCQ => "Circular Cheque",
    Self::SWSC => "ISDA/CSA Segregated Client Cash Collateral",
    Self::SWEP => "Sweeping",
    Self::DTCH => "Dutch Auction",
    Self::CLAI => "Compensation/Claims",
    Self::FWSB => "MFA Segregated Broker Cash Collateral",
    Self::CCIR => "Cross Currency IRS",
    Self::AREV => "ACH Reversal",
    Self::PRIN => "Interest Payment with Principles",
    Self::SOSI => "Settlement Of Sight Import Document",
    Self::XBST => "Cross-Border Standing Order",
    Self::XCHC => "Exchange Traded CCP",
    Self::STLM => "Settlement",
    Self::OPBC => "Option Broker Owned Collateral",
    Self::UNCO => "Underwriting Commission",
    Self::SUAA => "Subscription Asset Allocation",
    Self::NTAV => "Not Available",
    Self::TBCC => "TBA Client owned cash collateral",
    Self::ESDD => "SEPA Core Direct Debit",
    Self::LBDP => "Deposit",
    Self::ESCT => "SEPA Credit Transfer",
    Self::XCHN => "Exchange Traded Non-CCP",
    Self::EQPT => "Equity Option",
    Self::CHKD => "Check Deposit",
    Self::CMCO => "Corporate Mark Client Owned",
    Self::UPCT => "Unpaid Card Transaction",
    },
    )
    }
    }
  • edit in parsers/iso20022-parser/src/parser.rs at line 20
    [5.918723]
    [5.918723]
    pub(crate) fn from_reader(document: &'a [u8]) -> Self {
    Self::new(Reader::from_reader(document))
    }
  • replacement in parsers/iso20022-parser/src/parser.rs at line 25
    [5.918779][5.918779:918842]()
    let mut inner = quick_xml::Reader::from_str(document);
    [5.918779]
    [5.918842]
    Self::new(Reader::from_str(document))
    }
    }
  • edit in parsers/iso20022-parser/src/parser.rs at line 29
    [5.918843]
    [5.918843]
    impl<'a> XmlReader<'a> {
    fn new(mut inner: Reader<&'a [u8]>) -> Self {
  • replacement in parsers/iso20022-parser/src/parser.rs at line 104
    [5.920902][2.57:113]()
    let Event::Text(text) = event else { todo!() };
    [5.920902]
    [5.920978]
    let Event::Text(text) = event else {
    let event = event.into_owned();
    return UnexpectedTokenSnafu {
    expected: "a text event",
    received: event,
    }
    .fail();
    };
  • file addition: zip (d--r------)
    [5.1]
  • file addition: src (d--r------)
    [0.47539]
  • file addition: lib.rs (----------)
    [0.47556]
    use std::fs::Metadata;
    use std::io::prelude::Read;
    use std::io::Cursor;
    use beancount_types::Account;
    use beancount_types::Directive;
    use beancount_types::MetadataKy;
    use miette::Diagnostic;
    use miette::IntoDiagnostic as _;
    use snafu::prelude::Snafu;
    use time::Date;
    use zip::ZipArchive;
    #[derive(Debug, Diagnostic, Snafu)]
    pub enum Error {}
    #[derive(Debug)]
    pub struct Importer<I> {
    inner: I,
    }
    // TODO rethink this; would it be better if the framework handled zip files natively?
    impl<I> Importer<I> {
    const NAME: &'static str = "zip/wrapper";
    #[must_use]
    pub const fn new(inner: I) -> Self {
    Self { inner }
    }
    }
    impl<I> Importer<I> {}
    impl<I> beancount_importers_framework::ImporterProtocol for Importer<I>
    where
    I: beancount_importers_framework::ImporterProtocol,
    miette::Report: From<I::Error>,
    {
    type Error = miette::Report;
    fn account(&self, buffer: &[u8]) -> Result<Account, Self::Error> {
    let Some(account) = try_fold_files(buffer, None, |account, _, buf| {
    let new_account = self.inner.account(buf)?;
    let Some(old_account) = account else {
    return Ok(Some(new_account));
    };
    if old_account == new_account {
    Ok(Some(new_account))
    } else {
    unreachable!()
    }
    })?
    else {
    unreachable!();
    };
    Ok(account)
    }
    fn date(&self, buffer: &[u8]) -> Option<Result<Date, Self::Error>> {
    try_fold_files(buffer, None, |date, _, buf| {
    let Some(new_date) = self.inner.date(buf).transpose()? else {
    return Ok(date);
    };
    let new_date = date.map_or(new_date, |old_date| Date::max(old_date, new_date));
    Ok(Some(new_date))
    })
    .transpose()
    }
    fn extract(
    &self,
    buffer: &[u8],
    existing: &[Directive],
    ) -> Result<Vec<Directive>, Self::Error> {
    let key = <&MetadataKy>::try_from("file-in-archive").expect("valid metadata key");
    try_fold_files(buffer, vec![], |mut extracted, name, buf| {
    let mut new_directives = self.inner.extract(buf, existing)?;
    for d in &mut new_directives {
    d.add_meta(key, name);
    }
    extracted.append(&mut new_directives);
    Ok(extracted)
    })
    }
    fn filename(&self, _buffer: &[u8]) -> Option<Result<String, Self::Error>> {
    Some(Ok(String::from("archive.zip")))
    }
    fn identify(&self, buffer: &[u8]) -> Result<bool, Self::Error> {
    // TODO replace this with try_fold_files
    let mut archive = ZipArchive::new(Cursor::new(buffer)).into_diagnostic()?;
    // TODO consider using bytes here
    let mut buf = Vec::new();
    for idx in 0..archive.len() {
    let mut file = archive.by_index(idx).into_diagnostic()?;
    if file.is_dir() {
    continue;
    }
    let size = usize::try_from(file.size())
    .expect("size to fit in usize, otherwise this won't work anyway");
    buf.resize(size, 0);
    file.read_exact(&mut buf).into_diagnostic()?;
    if self.inner.identify(&buf).map_err(Into::into)? {
    return Ok(true);
    }
    }
    Ok(false)
    }
    fn name(&self) -> &'static str {
    Self::NAME
    }
    fn typetag_deserialize(&self) {}
    }
    fn try_fold_files<T, E, F>(buffer: &[u8], init: T, mut cb: F) -> miette::Result<T>
    where
    miette::Report: From<E>,
    F: FnMut(T, &str, &[u8]) -> Result<T, E>,
    {
    const BASE_BUFFER_SIZE: usize = 4096;
    let mut archive = ZipArchive::new(Cursor::new(buffer)).into_diagnostic()?;
    let mut acc = init;
    let mut buf = vec![0; BASE_BUFFER_SIZE];
    for idx in 0..archive.len() {
    let mut file = archive.by_index(idx).into_diagnostic()?;
    if file.is_dir() {
    continue;
    }
    let size = usize::try_from(file.size())
    .expect("size to fit in usize, otherwise this won't work any");
    buf.resize(size, 0);
    file.read_exact(&mut buf).into_diagnostic()?;
    acc = cb(acc, file.name(), &buf).map_err(Into::into)?;
    }
    Ok(acc)
    }
  • file addition: Cargo.toml (----------)
    [0.47539]
    [package]
    name = "beancount-importer-zip"
    authors.workspace = true
    edition.workspace = true
    publish.workspace = true
    rust-version.workspace = true
    version.workspace = true
    [dependencies]
    beancount-importers-framework.workspace = true
    beancount-types.workspace = true
    # Inherited dependencies
    miette.workspace = true
    snafu.workspace = true
    time.workspace = true
    tracing.workspace = true
    zip.workspace = true
    [lints]
    workspace = true
  • edit in importers/bw-bank/src/lib.rs at line 1
    [5.8832]
    [5.8833]
    pub mod camt;
  • file addition: camt.rs (----------)
    [5.22]
    use core::ops::Index;
    use core::str::FromStr;
    use beancount_importers_framework::error::ImporterBuilderError;
    use beancount_importers_framework::error::UninitializedFieldSnafu;
    use beancount_types::common_keys;
    use beancount_types::Account;
    use beancount_types::AccountTemplate;
    use beancount_types::Amount;
    use beancount_types::Balance;
    use beancount_types::Commodity;
    use beancount_types::Directive;
    use beancount_types::MetadataKey;
    use beancount_types::Seg;
    use beancount_types::Transaction;
    use derive_builder::Builder;
    use hashbrown::HashMap;
    use iban::Iban;
    use iso20022_parser::types::AccountIdentification4Choice;
    use iso20022_parser::types::AccountReport25;
    use iso20022_parser::types::ActiveOrHistoricCurrencyAndAmount;
    use iso20022_parser::types::AmountDirectionCode;
    use iso20022_parser::types::BalanceType10Choice;
    use iso20022_parser::types::BankToCustomerAccountReportV02;
    use iso20022_parser::types::BankToCustomerAccountReportV08;
    use iso20022_parser::types::CashBalance8;
    use iso20022_parser::types::DateAndDateTime2Choice;
    use iso20022_parser::types::ExternalBalanceType1Code;
    use iso20022_parser::types::GroupHeader42;
    use iso20022_parser::types::Iso20022Message;
    use iso20022_parser::types::Party40Choice;
    use iso20022_parser::types::PartyIdentification135;
    use iso20022_parser::types::ReportEntry10;
    use itertools::Itertools as _;
    use miette::Diagnostic;
    use miette::ErrReport;
    use serde::Deserialize;
    use snafu::Backtrace;
    use snafu::OptionExt as _;
    use snafu::Snafu;
    use tap::prelude::Tap as _;
    use time::format_description::well_known::Rfc3339;
    use time::Date;
    // TODO documentation
    // TODO balance assertions
    // TODO metadata + linking
    // TODO adjust accounts
    #[derive(Builder, Clone, Debug, Deserialize)]
    #[builder(
    build_fn(error = "ImporterBuilderError", skip),
    name = "ImporterBuilder"
    )]
    pub struct Config {
    #[builder(setter(into), try_setter)]
    pub account: AccountTemplate<TemplateSelector>,
    #[builder(setter(into), try_setter)]
    pub fallback_account: Account,
    #[builder(field(ty = "HashMap<Iban, Account>"))]
    pub known_ibans: HashMap<Iban, Account>,
    }
    #[derive(Debug, Diagnostic, Snafu)]
    pub enum Error {}
    #[derive(Debug, Deserialize)]
    pub struct Importer {
    #[serde(flatten)]
    config: Config,
    }
    impl Importer {
    const NAME: &'static str = "bw-bank/camt";
    #[must_use]
    pub fn builder() -> ImporterBuilder {
    ImporterBuilder::default()
    }
    #[must_use]
    pub fn new(config: Config) -> Self {
    Self { config }
    }
    }
    impl Importer {
    fn convert_report_entry_10(
    &self,
    account: impl Into<Account>,
    entry: ReportEntry10,
    ) -> Option<Transaction> {
    let Some(entry_date) = &entry.booking_date else {
    tracing::warn!(
    ?entry.account_servicer_reference,
    "skipping entry without booking date"
    );
    return None;
    };
    // TODO should we create one beancount transaction per details record?
    Some(Transaction::on(entry_date.date()).tap_mut(|txn| {
    let (_reversal, debit) = match entry.credit_debit_indicator {
    AmountDirectionCode::Debit => (false, true),
    AmountDirectionCode::Credit => (false, false),
    AmountDirectionCode::ReversalDebit => (true, false),
    AmountDirectionCode::ReversalCredit => (true, true),
    };
    let amount = {
    let amount = convert_amount(entry.amount);
    if debit {
    -amount
    } else {
    amount
    }
    };
    // TODO handle cash withdrawals
    let txn_details = entry
    .entry_details
    .first()
    .and_then(|details| details.transaction_details.first());
    let (counterparty, counterparty_account) = 'cp: {
    let Some(parties) =
    txn_details.and_then(|details| details.related_parties.as_ref())
    else {
    break 'cp (None, None);
    };
    if debit {
    (
    parties
    .ultimate_creditor
    .as_ref()
    .or(parties.creditor.as_ref()),
    parties.creditor_account.as_ref(),
    )
    } else {
    (
    parties.ultimate_debtor.as_ref().or(parties.debtor.as_ref()),
    parties.debtor_account.as_ref(),
    )
    }
    };
    let opposite_iban = counterparty_account.as_ref().and_then(|account| {
    if let AccountIdentification4Choice::Iban(iban) = account.identification {
    Some(iban.0)
    } else {
    None
    }
    });
    let opposite_account = opposite_iban
    .and_then(|opposite_iban| self.config.known_ibans.get(&opposite_iban))
    .unwrap_or(&self.config.fallback_account);
    if let Some(Party40Choice::Party(PartyIdentification135 {
    name: Some(name), ..
    })) = counterparty
    {
    txn.set_payee(name.0.as_ref());
    }
    if let Some(remittance_information) =
    txn_details.and_then(|txn_details| txn_details.remittance_information.as_ref())
    {
    if !remittance_information.structured.is_empty() {
    dbg!(&remittance_information.structured);
    }
    let narration = remittance_information
    .unstructured
    .iter()
    .map(|line| line.0.as_ref())
    .join("\n");
    txn.set_narration(narration);
    }
    if let Some(e2e_ref) = txn_details
    .and_then(|txn_details| txn_details.references.as_ref())
    .and_then(|refs| refs.end_to_end_identification.as_ref())
    {
    txn.add_meta(common_keys::END_TO_END_REFERENCE, e2e_ref.0.as_ref());
    }
    if let Some(btc) = txn_details
    .and_then(|txn_details| txn_details.bank_transaction_code.as_ref())
    .and_then(|btc| btc.domain.as_ref())
    {
    let domain = btc.code;
    let family = btc.family.code;
    let sub_family = btc.family.sub_family_code;
    txn.add_meta(
    MetadataKey::try_from("transaction-domain").expect("valid metadata key"),
    domain.to_string(),
    );
    txn.add_meta(
    MetadataKey::try_from("transaction-family").expect("valid metadata key"),
    family.to_string(),
    );
    txn.add_meta(
    MetadataKey::try_from("transaction-sub-family").expect("valid metadata key"),
    sub_family.to_string(),
    );
    }
    if let Some(opposite_iban) = opposite_iban {
    txn.add_meta(
    MetadataKey::try_from("other-iban").expect("valid metadata key"),
    opposite_iban.to_string(),
    );
    }
    if let DateAndDateTime2Choice::DateTime(timestamp) = entry_date {
    txn.add_meta(
    common_keys::TIMESTAMP,
    timestamp.0.format(&Rfc3339).expect("valid datetime"),
    );
    }
    if let Some(reference) = &entry.account_servicer_reference {
    txn.add_meta(common_keys::TRANSACTION_ID, reference.0.as_ref());
    }
    txn.build_posting(account, |posting| {
    posting.set_amount(amount);
    })
    // TODO check for known counterparties
    .build_posting(opposite_account, |_posting| {});
    }))
    }
    }
    impl beancount_importers_framework::ImporterProtocol for Importer {
    type Error = miette::Report;
    fn account(&self, _buffer: &[u8]) -> Result<Account, Self::Error> {
    Ok(self.config.account.base().to_owned())
    }
    fn date(&self, buffer: &[u8]) -> Option<Result<Date, Self::Error>> {
    let msg = Iso20022Message::try_from(buffer);
    let msg = match msg {
    Ok(msg) => msg,
    Err(error) => {
    return Some(Err(ErrReport::from(error)));
    }
    };
    // TODO this should use the report date instead
    let date = match msg {
    Iso20022Message::BankToCustomerAccountReportV02(BankToCustomerAccountReportV02 {
    group_header:
    GroupHeader42 {
    creation_date_time, ..
    },
    report,
    ..
    }) => report
    .iter()
    .filter_map(|rpt| {
    rpt.from_to_date
    .as_ref()
    .map(|period| period.to_date_time.0.date())
    })
    .max()
    .unwrap_or(creation_date_time.0.date()),
    Iso20022Message::BankToCustomerAccountReportV08(rpt) => extract_report_v08_date(&rpt),
    };
    Some(Ok(date))
    }
    fn extract(
    &self,
    buffer: &[u8],
    _existing: &[Directive],
    ) -> Result<Vec<Directive>, Self::Error> {
    let msg = Iso20022Message::try_from(buffer)?;
    let extracted = match msg {
    Iso20022Message::BankToCustomerAccountReportV02(BankToCustomerAccountReportV02 {
    ..
    }) => {
    vec![]
    }
    Iso20022Message::BankToCustomerAccountReportV08(BankToCustomerAccountReportV08 {
    report,
    ..
    }) => {
    let mut extracted = Vec::new();
    for rpt in report {
    let account = self.config.account.render(&TemplateContext {});
    for balance in rpt.balance {
    let BalanceType10Choice::Code(ExternalBalanceType1Code::Clbd) =
    balance.r#type.code_or_proprietary
    else {
    continue;
    };
    extracted.push(Directive::from(convert_cash_balance_8(&account, balance)));
    }
    for entry in rpt.entry {
    let Some(txn) = self.convert_report_entry_10(&account, entry) else {
    continue;
    };
    extracted.push(Directive::from(txn));
    }
    }
    extracted
    }
    };
    Ok(extracted)
    }
    fn filename(&self, _buffer: &[u8]) -> Option<Result<String, Self::Error>> {
    Some(Ok(String::from("account-report.xml")))
    }
    fn identify(&self, buffer: &[u8]) -> Result<bool, Self::Error> {
    let message = Iso20022Message::try_from(buffer)?;
    let matching = match message {
    // TODO check whether IBAN or similar matches
    Iso20022Message::BankToCustomerAccountReportV02(_) => true,
    Iso20022Message::BankToCustomerAccountReportV08(_) => true,
    };
    Ok(matching)
    }
    fn name(&self) -> &'static str {
    Self::NAME
    }
    fn typetag_deserialize(&self) {}
    }
    impl ImporterBuilder {
    pub fn add_known_iban(&mut self, iban: Iban, account: Account) -> &mut Self {
    self.known_ibans.insert(iban, account);
    self
    }
    pub fn build(&mut self) -> Result<Importer, ImporterBuilderError> {
    let config = Config {
    account: self.account.clone().context(UninitializedFieldSnafu {
    field: "account",
    importer: Importer::NAME,
    })?,
    fallback_account: self
    .fallback_account
    .clone()
    .context(UninitializedFieldSnafu {
    field: "fallback_account",
    importer: Importer::NAME,
    })?,
    known_ibans: self.known_ibans.clone(),
    };
    Ok(Importer::new(config))
    }
    pub fn clear_known_ibans(&mut self) -> &mut Self {
    self.known_ibans.clear();
    self
    }
    }
    #[derive(Clone, Copy, Debug)]
    pub enum TemplateSelector {}
    impl FromStr for TemplateSelector {
    type Err = TemplateSelectorError;
    fn from_str(selector: &str) -> Result<Self, Self::Err> {
    TemplateSelectorSnafu { selector }.fail()
    }
    }
    #[derive(Debug, Diagnostic, Snafu)]
    pub struct TemplateSelectorError {
    selector: String,
    backtrace: Backtrace,
    }
    #[derive(Debug)]
    struct TemplateContext {}
    impl Index<&TemplateSelector> for TemplateContext {
    type Output = Seg;
    fn index(&self, selector: &TemplateSelector) -> &Self::Output {
    match *selector {}
    }
    }
    fn extract_report_v08_date(rpt: &BankToCustomerAccountReportV08) -> Date {
    rpt.report
    .iter()
    .filter_map(|rpt| extract_account_report_25_date(rpt))
    .max()
    .unwrap_or(rpt.group_header.creation_date_time.0.date())
    }
    fn extract_account_report_25_date(rpt: &AccountReport25) -> Option<Date> {
    if let Some(period) = &rpt.from_to_date {
    return Some(period.to_date_time.0.date());
    }
    if let Some(date) = rpt
    .balance
    .iter()
    .map(|bal| bal.date.date())
    .max()
    .and_then(Date::next_day)
    {
    return Some(date);
    };
    None
    }
    fn convert_amount(amount: ActiveOrHistoricCurrencyAndAmount) -> Amount {
    let currency =
    Commodity::try_from(amount.currency.0.code()).expect("currencies are valid commodities");
    Amount::new(amount.amount, currency)
    }
    fn convert_cash_balance_8(account: impl Into<Account>, balance: CashBalance8) -> Balance {
    let (_reversal, debit) = match balance.credit_debit_indicator {
    AmountDirectionCode::Debit => (false, true),
    AmountDirectionCode::Credit => (false, false),
    AmountDirectionCode::ReversalDebit => (true, false),
    AmountDirectionCode::ReversalCredit => (true, true),
    };
    let amount = convert_amount(balance.amount);
    let amount = if debit { -amount } else { amount };
    let entry_date = balance.date;
    let date = entry_date.date().next_day().expect("valid next day");
    Balance::new(date, account, amount).tap_mut(|balance| {
    if let DateAndDateTime2Choice::DateTime(timestamp) = entry_date {
    balance.add_meta(
    common_keys::TIMESTAMP,
    timestamp.0.format(&Rfc3339).expect("valid datetime"),
    );
    }
    })
    }
  • replacement in importers/bw-bank/Cargo.toml at line 15
    [5.4827][5.4827:4899]()
    german-decimal.path = "../../common/german-decimal"
    [5.4827]
    [5.9341]
    german-decimal.path = "../../common/german-decimal"
    iso20022-parser.path = "../../parsers/iso20022-parser"
  • edit in importers/bw-bank/Cargo.toml at line 20
    [5.9367]
    [5.9399]
    bstr.workspace = true
  • edit in importers/bw-bank/Cargo.toml at line 22
    [5.9431]
    [5.9431]
    hashbrown.workspace = true
    iban_validate.workspace = true
  • edit in importers/bw-bank/Cargo.toml at line 33
    [5.9687]
    tracing.workspace = true
  • replacement in generators/src/bin/iso20022-generator/passes/codegen.rs at line 153
    [5.91769666][5.91769666:91769695]()
    amount: Decimal,
    [5.91769666]
    [5.91769695]
    pub amount: Decimal,
  • replacement in generators/src/bin/iso20022-generator/passes/codegen.rs at line 274
    [5.91773480][5.91773480:91773510]()
    pub struct #ty(Date);
    [5.91773480]
    [5.91773510]
    pub struct #ty(pub Date);
  • replacement in generators/src/bin/iso20022-generator/passes/codegen.rs at line 299
    [5.91774211][5.91774211:91774251]()
    pub struct #ty(OffsetDateTime);
    [5.91774211]
    [5.91774251]
    pub struct #ty(pub OffsetDateTime);
  • replacement in generators/src/bin/iso20022-generator/passes/codegen.rs at line 567
    [5.91780638][5.91780638:91780733]()
    impl<'a> TryFrom<&'a str> for Iso20022Message<'a> {
    type Error = XmlError;
    [5.91780638]
    [5.91780733]
    impl<'a> Iso20022Message<'a> {
    fn parse(mut reader: XmlReader<'a>) -> XmlResult<Self> {
    reader.try_declaration()?;
  • edit in generators/src/bin/iso20022-generator/passes/codegen.rs at line 571
    [5.91780734][5.91780734:91780906]()
    fn try_from(document: &'a str) -> XmlResult<Self> {
    let mut reader = XmlReader::from_str(document);
    reader.try_declaration()?;
  • replacement in generators/src/bin/iso20022-generator/passes/codegen.rs at line 577
    [5.91781278][5.91781278:91781312]()
    _ => todo!(),
    [5.91781278]
    [5.91781312]
    _ => todo!("unhandled root tag {root_tag:?}"),
  • edit in generators/src/bin/iso20022-generator/passes/codegen.rs at line 583
    [5.91781415]
    [5.91781415]
    }
    }
    impl<'a> TryFrom<&'a [u8]> for Iso20022Message<'a> {
    type Error = XmlError;
    fn try_from(document: &'a [u8]) -> XmlResult<Self> {
    let reader = XmlReader::from_reader(document);
    Self::parse(reader)
  • edit in generators/src/bin/iso20022-generator/passes/codegen.rs at line 594
    [5.91781439]
    [5.91781439]
    impl<'a> TryFrom<&'a str> for Iso20022Message<'a> {
    type Error = XmlError;
    fn try_from(document: &'a str) -> XmlResult<Self> {
    let reader = XmlReader::from_str(document);
    Self::parse(reader)
    }
    }
  • replacement in generators/src/bin/iso20022-generator/passes/codegen.rs at line 623
    [5.91781935][5.91781935:91781973]()
    pub struct #ty(Cow<'a, str>);
    [5.91781935]
    [5.91781973]
    pub struct #ty(pub Cow<'a, str>);
  • edit in generators/src/bin/iso20022-generator/main.rs at line 14
    [5.1355]
    [5.1355]
    use itertools::Itertools;
    use itertools::Itertools as _;
  • replacement in generators/src/bin/iso20022-generator/main.rs at line 238
    [5.6544][5.6544:6614]()
    let (domain_codes, domain_code_parsers): (Vec<_>, Vec<_>) = codes
    [5.6544]
    [5.6614]
    let (domain_codes, domain_code_parsers, domain_code_printers): (Vec<_>, Vec<_>, Vec<_>) = codes
  • edit in generators/src/bin/iso20022-generator/main.rs at line 246
    [5.6856]
    [5.6856]
    quote!(Self::#ident => #description,),
  • replacement in generators/src/bin/iso20022-generator/main.rs at line 249
    [5.6881][5.6881:6969]()
    .unzip();
    let (family_codes, family_code_parsers): (Vec<_>, Vec<_>) = codes
    [5.6881]
    [5.6969]
    .multiunzip();
    let (family_codes, family_code_parsers, family_code_printers): (Vec<_>, Vec<_>, Vec<_>) = codes
  • edit in generators/src/bin/iso20022-generator/main.rs at line 258
    [5.7211]
    [5.7211]
    quote!(Self::#ident => #description,),
  • replacement in generators/src/bin/iso20022-generator/main.rs at line 261
    [5.7236][5.7236:7332]()
    .unzip();
    let (sub_family_codes, sub_family_code_parsers): (Vec<_>, Vec<_>) = codes
    [5.7236]
    [5.7332]
    .multiunzip();
    let (sub_family_codes, sub_family_code_parsers, sub_family_code_printers): (
    Vec<_>,
    Vec<_>,
    Vec<_>,
    ) = codes
  • edit in generators/src/bin/iso20022-generator/main.rs at line 274
    [5.7578]
    [5.7578]
    quote!(Self::#ident => #description,),
  • replacement in generators/src/bin/iso20022-generator/main.rs at line 277
    [5.7603][5.7603:7621]()
    .unzip();
    [5.7603]
    [5.7621]
    .multiunzip();
  • edit in generators/src/bin/iso20022-generator/main.rs at line 300
    [5.8312]
    [5.8312]
    }
    }
    impl ::core::fmt::Display for ExternalBankTransactionDomain1Code {
    fn fmt(&self, f: &mut core::fmt::Formatter) -> ::core::fmt::Result {
    f.write_str(match self {
    #(#domain_code_printers)*
    })
  • edit in generators/src/bin/iso20022-generator/main.rs at line 325
    [5.8861]
    [5.8861]
    }
    }
    impl ::core::fmt::Display for ExternalBankTransactionFamily1Code {
    fn fmt(&self, f: &mut core::fmt::Formatter) -> ::core::fmt::Result {
    f.write_str(match self {
    #(#family_code_printers)*
    })
  • edit in generators/src/bin/iso20022-generator/main.rs at line 350
    [5.9424]
    [5.9424]
    }
    }
    impl ::core::fmt::Display for ExternalBankTransactionSubFamily1Code {
    fn fmt(&self, f: &mut core::fmt::Formatter) -> ::core::fmt::Result {
    f.write_str(match self {
    #(#sub_family_code_printers)*
    })
  • edit in generators/Cargo.toml at line 25
    [5.91792384]
    [5.91792384]
    itertools.workspace = true
  • edit in generators/Cargo.toml at line 38
    [5.91792744]
    [5.91792744]
    tracing.workspace = true
  • edit in generators/Cargo.toml at line 41
    [5.91792816][5.91792816:91792852]()
    tracing.workspace = true
  • replacement in framework/src/runner.rs at line 180
    [5.4417][5.4417:4468]()
    #[tracing::instrument(skip(self, directives))]
    [5.4417]
    [5.4468]
    #[tracing::instrument(skip(self, directives, path))]
  • replacement in framework/src/runner.rs at line 224
    [5.5716][5.5716:5767]()
    #[tracing::instrument(skip(self, directives))]
    [5.5716]
    [5.5767]
    #[tracing::instrument(skip(self, directives, path))]
  • replacement in framework/src/runner.rs at line 237
    [5.6173][5.6173:6212]()
    #[tracing::instrument(skip(self))]
    [5.6173]
    [5.6212]
    #[tracing::instrument(skip(self, paths))]
  • edit in framework/src/lib.rs at line 18
    [5.8982]
    [5.8982]
    /*
    TODO ImporterProtocol has a couple of limitations, as currently implemented:
    1. We parse any input at least twice: once to identify, then again to extract.
    The importer may even need to parse the file more often, e.g., to determine the report date.
    2. The ZIP-File importer cannot handle multiple internal importers cleanly.
    */
  • replacement in beancount/types/src/metadata/kv/common_keys.rs at line 7
    [3.165][3.165:262]()
    pub const EFFECTIVE_DATE: &MetadataKy = unsafe { MetadataKy::from_unchecked("effective-date") };
    [3.165]
    [3.262]
    pub const EFFECTIVE_DATE: &MetadataKy = unsafe { MetadataKy::from_unchecked("effective_date") };
    pub const END_TO_END_REFERENCE: &MetadataKy =
    unsafe { MetadataKy::from_unchecked("end-to-end-reference") };
  • edit in Cargo.toml at line 19
    [43.461]
    [43.461]
    "importers/zip",
  • edit in Cargo.toml at line 87
    [5.833]
    [5.7165]
    zip = "2.1.0"
  • edit in Cargo.lock at line 21
    [44.1522]
    [5.19]
    name = "aes"
    version = "0.8.4"
    source = "registry+https://github.com/rust-lang/crates.io-index"
    checksum = "b169f7a6d4742236a0a00c541b845991d0ac43e546831af1249753ab4c3aa3a0"
    dependencies = [
    "cfg-if",
    "cipher",
    "cpufeatures",
    ]
    [[package]]
  • replacement in Cargo.lock at line 194
    [5.7705][5.738:754](),[5.738][5.738:754]()
    "time 0.3.34",
    [5.7705]
    [5.7706]
    "time 0.3.36",
  • replacement in Cargo.lock at line 215
    [5.8023][5.8023:8039]()
    "time 0.3.34",
    [5.8023]
    [5.8039]
    "time 0.3.36",
  • edit in Cargo.lock at line 226
    [5.900]
    [5.920]
    "bstr",
  • edit in Cargo.lock at line 229
    [5.958]
    [5.958]
    "hashbrown 0.14.3",
    "iban_validate",
  • edit in Cargo.lock at line 233
    [5.981]
    [5.981]
    "iso20022-parser",
  • replacement in Cargo.lock at line 240
    [5.1042][5.867:883](),[5.867][5.867:883]()
    "time 0.3.34",
    [5.1042]
    [5.883]
    "time 0.3.36",
    "tracing",
  • replacement in Cargo.lock at line 258
    [5.8322][5.8322:8338]()
    "time 0.3.34",
    [5.8322]
    [5.8338]
    "time 0.3.36",
  • replacement in Cargo.lock at line 279
    [5.8447][5.8447:8463]()
    "time 0.3.34",
    [5.8447]
    [5.8463]
    "time 0.3.36",
  • replacement in Cargo.lock at line 299
    [5.18051][5.8720:8736]()
    "time 0.3.34",
    [5.18051]
    [5.8736]
    "time 0.3.36",
  • replacement in Cargo.lock at line 319
    [5.9032][5.1615:1631](),[5.18051][5.1615:1631]()
    "time 0.3.34",
    [5.9032]
    [5.9033]
    "time 0.3.36",
  • replacement in Cargo.lock at line 341
    [5.9233][5.9233:9249]()
    "time 0.3.34",
    [5.9233]
    [5.9249]
    "time 0.3.36",
  • replacement in Cargo.lock at line 360
    [5.9550][5.9550:9566]()
    "time 0.3.34",
    [5.9550]
    [5.9566]
    "time 0.3.36",
  • replacement in Cargo.lock at line 377
    [5.9840][5.9840:9856]()
    "time 0.3.34",
    [5.9840]
    [5.9856]
    "time 0.3.36",
  • replacement in Cargo.lock at line 395
    [5.21477][5.1632:1648]()
    "time 0.3.34",
    [5.21477]
    [5.2524]
    "time 0.3.36",
    ]
    [[package]]
    name = "beancount-importer-zip"
    version = "0.0.0-dev.0"
    dependencies = [
    "beancount-importers-framework",
    "beancount-types",
    "miette",
    "snafu",
    "time 0.3.36",
    "tracing",
    "zip 2.1.0",
  • replacement in Cargo.lock at line 426
    [5.28491][5.1649:1665]()
    "time 0.3.34",
    [5.28491]
    [5.15447]
    "time 0.3.36",
  • edit in Cargo.lock at line 449
    [5.468]
    [5.91794325]
    "itertools 0.12.1",
  • replacement in Cargo.lock at line 461
    [5.1957][5.1697:1713](),[5.1697][5.1697:1713]()
    "time 0.3.34",
    [5.1957]
    [5.1958]
    "time 0.3.36",
  • replacement in Cargo.lock at line 491
    [4.1616][5.1735:1751](),[5.492][5.1735:1751]()
    "time 0.3.34",
    [4.1616]
    [5.7734]
    "time 0.3.36",
  • replacement in Cargo.lock at line 510
    [5.5885][5.1774:1790]()
    "time 0.3.34",
    [5.5885]
    [5.681]
    "time 0.3.36",
  • replacement in Cargo.lock at line 535
    [5.26752][5.1791:1807]()
    "time 0.3.34",
    [5.26752]
    [5.551]
    "time 0.3.36",
  • edit in Cargo.lock at line 594
    [5.1404]
    [5.579]
    name = "block-buffer"
    version = "0.10.4"
    source = "registry+https://github.com/rust-lang/crates.io-index"
    checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71"
    dependencies = [
    "generic-array",
    ]
    [[package]]
  • edit in Cargo.lock at line 678
    [5.6244]
    [5.9992]
    name = "bzip2"
    version = "0.4.4"
    source = "registry+https://github.com/rust-lang/crates.io-index"
    checksum = "bdb116a6ef3f6c3698828873ad02c3014b3c85cadb88496095628e3ef1e347f8"
    dependencies = [
    "bzip2-sys",
    "libc",
    ]
    [[package]]
    name = "bzip2-sys"
    version = "0.1.11+1.0.8"
    source = "registry+https://github.com/rust-lang/crates.io-index"
    checksum = "736a955f3fa7875102d57c82b8cac37ec45224a07fd32d58f9f7a186b6cd4cdc"
    dependencies = [
    "cc",
    "libc",
    "pkg-config",
    ]
    [[package]]
  • replacement in Cargo.lock at line 710
    [5.10271][5.10271:10279]()
    "zip",
    [5.10271]
    [5.10279]
    "zip 0.6.6",
  • edit in Cargo.lock at line 743
    [5.2585]
    [5.6259]
    dependencies = [
    "jobserver",
    "libc",
    ]
  • edit in Cargo.lock at line 759
    [5.3652]
    [5.7424]
    [[package]]
    name = "cipher"
    version = "0.4.4"
    source = "registry+https://github.com/rust-lang/crates.io-index"
    checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad"
    dependencies = [
    "crypto-common",
    "inout",
    ]
  • edit in Cargo.lock at line 875
    [5.8020]
    [5.4061]
    [[package]]
    name = "constant_time_eq"
    version = "0.3.0"
    source = "registry+https://github.com/rust-lang/crates.io-index"
    checksum = "f7144d30dcf0fafbce74250a3963025d8d52177934239851c917d29f1df280c2"
  • edit in Cargo.lock at line 902
    [5.8961]
    [5.8961]
    ]
    [[package]]
    name = "cpufeatures"
    version = "0.2.12"
    source = "registry+https://github.com/rust-lang/crates.io-index"
    checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504"
    dependencies = [
    "libc",
    ]
    [[package]]
    name = "crc"
    version = "3.2.1"
    source = "registry+https://github.com/rust-lang/crates.io-index"
    checksum = "69e6e4d7b33a94f0991c26729976b10ebde1d34c3ee82408fb536164fa10d636"
    dependencies = [
    "crc-catalog",
  • edit in Cargo.lock at line 921
    [5.8963]
    [5.8963]
    [[package]]
    name = "crc-catalog"
    version = "2.4.0"
    source = "registry+https://github.com/rust-lang/crates.io-index"
    checksum = "19d374276b40fb8bbdee95aef7c7fa6b5316ec764510eb64b8dd0e2ed0d7e7f5"
  • edit in Cargo.lock at line 967
    [5.3877]
    [44.1568]
    [[package]]
    name = "crypto-common"
    version = "0.1.6"
    source = "registry+https://github.com/rust-lang/crates.io-index"
    checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3"
    dependencies = [
    "generic-array",
    "typenum",
    ]
  • edit in Cargo.lock at line 1079
    [5.5386]
    [5.5386]
    [[package]]
    name = "deflate64"
    version = "0.1.8"
    source = "registry+https://github.com/rust-lang/crates.io-index"
    checksum = "83ace6c86376be0b6cdcf3fb41882e81d94b31587573d1cfa9d01cd06bba210d"
  • edit in Cargo.lock at line 1150
    [5.6669]
    [5.6669]
    name = "digest"
    version = "0.10.7"
    source = "registry+https://github.com/rust-lang/crates.io-index"
    checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292"
    dependencies = [
    "block-buffer",
    "crypto-common",
    "subtle",
    ]
    [[package]]
  • edit in Cargo.lock at line 1505
    [5.16038]
    [5.16038]
    ]
    [[package]]
    name = "generic-array"
    version = "0.14.7"
    source = "registry+https://github.com/rust-lang/crates.io-index"
    checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a"
    dependencies = [
    "typenum",
    "version_check",
  • edit in Cargo.lock at line 1648
    [5.19112]
    [5.19112]
    name = "hmac"
    version = "0.12.1"
    source = "registry+https://github.com/rust-lang/crates.io-index"
    checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e"
    dependencies = [
    "digest",
    ]
    [[package]]
  • replacement in Cargo.lock at line 1903
    [5.24155][5.24155:24163]()
    "zip",
    [5.24155]
    [5.24163]
    "zip 0.6.6",
  • edit in Cargo.lock at line 2237
    [5.31349]
    [5.31349]
    name = "inout"
    version = "0.1.3"
    source = "registry+https://github.com/rust-lang/crates.io-index"
    checksum = "a0c10553d664a4d0bcff9f4215d0aac67a639cc68ef660840afe309b807bc9f5"
    dependencies = [
    "generic-array",
    ]
    [[package]]
  • replacement in Cargo.lock at line 2298
    [5.32594][5.32594:32610]()
    "time 0.3.34",
    [5.32594]
    [5.32610]
    "time 0.3.36",
  • edit in Cargo.lock at line 2368
    [5.34357]
    [5.34357]
    name = "jobserver"
    version = "0.1.31"
    source = "registry+https://github.com/rust-lang/crates.io-index"
    checksum = "d2b099aaa34a9751c5bf0878add70444e1ed2dd73f347be99003d4577277de6e"
    dependencies = [
    "libc",
    ]
    [[package]]
  • edit in Cargo.lock at line 2481
    [5.37188]
    [5.37188]
    [[package]]
    name = "lockfree-object-pool"
    version = "0.1.6"
    source = "registry+https://github.com/rust-lang/crates.io-index"
    checksum = "9374ef4228402d4b7e403e5838cb880d9ee663314b0a900d5a6aabf0c213552e"
  • edit in Cargo.lock at line 2513
    [5.37875]
    [5.37875]
    ]
    [[package]]
    name = "lzma-rs"
    version = "0.3.0"
    source = "registry+https://github.com/rust-lang/crates.io-index"
    checksum = "297e814c836ae64db86b36cf2a557ba54368d03f6afcd7d947c266692f71115e"
    dependencies = [
    "byteorder",
    "crc",
  • edit in Cargo.lock at line 2815
    [5.45281]
    [5.45578]
    ]
    [[package]]
    name = "pbkdf2"
    version = "0.12.2"
    source = "registry+https://github.com/rust-lang/crates.io-index"
    checksum = "f8ed6a7761f76e3b9f92dfb0a60a6a6477c61024b775147ff0973a02653abaf2"
    dependencies = [
    "digest",
    "hmac",
  • edit in Cargo.lock at line 2912
    [5.47862]
    [5.47862]
    [[package]]
    name = "pkg-config"
    version = "0.3.30"
    source = "registry+https://github.com/rust-lang/crates.io-index"
    checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec"
  • edit in Cargo.lock at line 3554
    [5.63256]
    [5.63256]
    name = "sha1"
    version = "0.10.6"
    source = "registry+https://github.com/rust-lang/crates.io-index"
    checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba"
    dependencies = [
    "cfg-if",
    "cpufeatures",
    "digest",
    ]
    [[package]]
  • edit in Cargo.lock at line 3587
    [5.63899]
    [5.63899]
    [[package]]
    name = "simd-adler32"
    version = "0.3.7"
    source = "registry+https://github.com/rust-lang/crates.io-index"
    checksum = "d66dc143e6b11c1eddc06d5c423cfc97062865baf299914ab64caa38182078fe"
  • replacement in Cargo.lock at line 3743
    [5.67830][5.67830:67839]()
    "sha1",
    [5.67830]
    [5.67839]
    "sha1 0.6.1",
  • replacement in Cargo.lock at line 3974
    [5.73511][5.73511:73530]()
    version = "0.3.34"
    [5.73511]
    [5.73530]
    version = "0.3.36"
  • replacement in Cargo.lock at line 3976
    [5.73595][5.73595:73673]()
    checksum = "c8248b6521bb14bc45b4067159b9b6ad792e2d6d754d6c41fb50e29fefe38749"
    [5.73595]
    [5.73673]
    checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885"
  • replacement in Cargo.lock at line 3987
    [5.73798][5.73798:73821]()
    "time-macros 0.2.17",
    [5.73798]
    [5.73821]
    "time-macros 0.2.18",
  • replacement in Cargo.lock at line 4008
    [5.74305][5.74305:74324]()
    version = "0.2.17"
    [5.74305]
    [5.74324]
    version = "0.2.18"
  • replacement in Cargo.lock at line 4010
    [5.74389][5.74389:74467]()
    checksum = "7ba3a3ef41e6672a2f0f001392bb5dcd3ff0a9992d618ca761a11c3121547774"
    [5.74389]
    [5.74467]
    checksum = "3f252a68540fde3a3877aeea552b832b40ab9a69e318efd078774a01ddee1ccf"
  • replacement in Cargo.lock at line 4043
    [5.75122][5.75122:75138]()
    "time 0.3.34",
    [5.75122]
    [5.75138]
    "time 0.3.36",
  • edit in Cargo.lock at line 4282
    [5.80832]
    [5.80832]
    [[package]]
    name = "typenum"
    version = "1.17.0"
    source = "registry+https://github.com/rust-lang/crates.io-index"
    checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825"
  • edit in Cargo.lock at line 5187
    [5.104944]
    [5.104944]
    dependencies = [
    "zeroize_derive",
    ]
    [[package]]
    name = "zeroize_derive"
    version = "1.4.2"
    source = "registry+https://github.com/rust-lang/crates.io-index"
    checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69"
    dependencies = [
    "proc-macro2",
    "quote",
    "syn 2.0.58",
    ]
  • edit in Cargo.lock at line 5248
    [5.105991]
    [5.105991]
    "crc32fast",
    "crossbeam-utils",
    "flate2",
    ]
    [[package]]
    name = "zip"
    version = "2.1.0"
    source = "registry+https://github.com/rust-lang/crates.io-index"
    checksum = "e2568cd0f20e86cd9a7349fe05178f7bd22f22724678448ae5a9bac266df2689"
    dependencies = [
    "aes",
    "arbitrary",
    "bzip2",
    "constant_time_eq",
  • edit in Cargo.lock at line 5265
    [5.106025]
    [5.106025]
    "deflate64",
    "displaydoc",
  • edit in Cargo.lock at line 5268
    [5.106036]
    [5.106036]
    "hmac",
    "indexmap 2.2.6",
    "lzma-rs",
    "memchr",
    "pbkdf2",
    "rand",
    "sha1 0.10.6",
    "thiserror",
    "time 0.3.36",
    "zeroize",
    "zopfli",
    "zstd",
  • edit in Cargo.lock at line 5281
    [5.106038]
    [[package]]
    name = "zopfli"
    version = "0.8.1"
    source = "registry+https://github.com/rust-lang/crates.io-index"
    checksum = "e5019f391bac5cf252e93bbcc53d039ffd62c7bfb7c150414d61369afe57e946"
    dependencies = [
    "bumpalo",
    "crc32fast",
    "lockfree-object-pool",
    "log",
    "once_cell",
    "simd-adler32",
    ]
    [[package]]
    name = "zstd"
    version = "0.13.1"
    source = "registry+https://github.com/rust-lang/crates.io-index"
    checksum = "2d789b1514203a1120ad2429eae43a7bd32b90976a7bb8a05f7ec02fa88cc23a"
    dependencies = [
    "zstd-safe",
    ]
    [[package]]
    name = "zstd-safe"
    version = "7.1.0"
    source = "registry+https://github.com/rust-lang/crates.io-index"
    checksum = "1cd99b45c6bc03a018c8b8a86025678c87e55526064e38f9df301989dce7ec0a"
    dependencies = [
    "zstd-sys",
    ]
    [[package]]
    name = "zstd-sys"
    version = "2.0.10+zstd.1.5.6"
    source = "registry+https://github.com/rust-lang/crates.io-index"
    checksum = "c253a4914af5bafc8fa8c86ee400827e83cf6ec01195ec1f1ed8441bf00d65aa"
    dependencies = [
    "cc",
    "pkg-config",
    ]