lib

Core libraries for Radroots
git clone https://radroots.dev/git/lib.git
Log | Files | Refs | README

reduce_trade.rs (364B)


      1 use radroots_event::trade::TradeId;
      2 use radroots_trade::{ReductionInput, reducer::reduce_trade_records};
      3 
      4 fn main() -> Result<(), Box<dyn std::error::Error>> {
      5     let trade_id = TradeId::parse("0123456789abcdef".repeat(2))?;
      6     let projection = reduce_trade_records(ReductionInput::new(trade_id));
      7 
      8     assert_eq!(projection.trade_id(), &trade_id);
      9     Ok(())
     10 }