use crate::v1::TimedBlockId; #[test] fn _1()->Result<(),crate::v1::Error>{ let file=std::fs::File::open("files/bhop_marble_7cf33a64-7120-4514-b9fa-4fe29d9523d").unwrap(); let input=std::io::BufReader::new(file); let mut bot_file=crate::v1::File::new(input).unwrap(); println!("header={:?}",bot_file.header); for &TimedBlockId{time,block_id} in &bot_file.header.offline_blocks_timeline{ println!("offline time={} block_id={:?}",time,block_id); let block_info=bot_file.header.block_info(block_id)?; let block=bot_file.data.read_block_info(block_info)?; // offline blocks include the following event types: // World, Gravity, Run, Camera, Setting } for &TimedBlockId{time,block_id} in &bot_file.header.realtime_blocks_timeline{ println!("realtime time={} block_id={:?}",time,block_id); let block_info=bot_file.header.block_info(block_id)?; let block=bot_file.data.read_block_info(block_info)?; // realtime blocks include the following event types: // Input, Output, Sound } Ok(()) }