pub fn add_static_track<'a,I>(&mut self, track: I) where I: Iterator<Item=&'a AbsoluteEvent> {
        let mut cur_time: u64 = 0;
        let vec = track.map(|bev| {
            assert!(bev.time >= cur_time);
            let vtime = bev.time - cur_time;
            cur_time = bev.time;
            TrackEvent {
                vtime: vtime,
                event: bev.event.clone(),
            }
        }).collect();
        self.tracks.push(TrackBuilder {
            copyright: None,
            name: None,
            events: EventContainer::Static(vec),
        });
    }
/// Add a static track to the builder (note this will clone all events in the passed iterator)
Add a static track to the builder (note this will clone all events in the passed iterator)
Add a static track to the builder ( note this will clone all events in the passed iterator )
pub fn add_static_track<'a,I>(&mut self, track: I) where I: Iterator<Item=&'a AbsoluteEvent> {
        let mut cur_time: u64 = 0;
        let vec = track.map(|bev| {
            assert!(bev.time >= cur_time);
            let vtime = bev.time - cur_time;
            cur_time = bev.time;
            TrackEvent {
                vtime: vtime,
                event: bev.event.clone(),
            }
        }).collect();
        self.tracks.push(TrackBuilder {
            copyright: None,
            name: None,
            events: EventContainer::Static(vec),
        });
    }
pub fn add_static_track < ' a , I > ( & mut self , track : I ) where I : Iterator < Item = & ' a AbsoluteEvent > { let mut cur_time : u64 = 0 ; let vec = track . map ( | bev | { assert ! ( bev time cur_time ) ; let vtime = bev . time - cur_time ; cur_time = bev . time ; TrackEvent { vtime : vtime , event : bev . event . clone ( ) , } } ) . collect ( ) ; self . tracks . push ( TrackBuilder { copyright : None , name : None , events : EventContainer :: Static ( vec ) , } ) ; }
Add a static track to the builder (note this will clone all events in the passed iterator)
Add a static track to the builder ( note this will clone all events in the passed iterator )
&mut self
track
I
&mut self
track
I