pub fn apply(&mut self, control: Control) {
        if self.count.is_none() {
            self.count = Some(control.count);
        }
        if let Some(ref mut count) = self.count {
            assert!(*count > 0, "Received incorrect number of Controls");
            *count -= 1;
        }
        if let Some(sequence) = self.sequence {
            assert_eq!(sequence, control.sequence, "Received control with inconsistent sequence number");
        } else {
            self.sequence = Some(control.sequence);
        }
        match control.inst {
            ControlInst::None => {},
            inst => self.instructions.push(inst),
        };

    }
/// Add a new `Control` to this builder.
///
/// TODO: Currently, it will assert if count and sequence numbers do not match. Should fail
/// gracefully instead.
Add a new `Control` to this builder.
TODO: Currently, it will assert if count and sequence numbers do not match. Should fail
gracefully instead.
Add a new ` Control ` to this builder . TODO : Currently it will assert if count and sequence numbers do not match . Should fail gracefully instead .
pub fn apply(&mut self, control: Control) {
        if self.count.is_none() {
            self.count = Some(control.count);
        }
        if let Some(ref mut count) = self.count {
            assert!(*count > 0, "Received incorrect number of Controls");
            *count -= 1;
        }
        if let Some(sequence) = self.sequence {
            assert_eq!(sequence, control.sequence, "Received control with inconsistent sequence number");
        } else {
            self.sequence = Some(control.sequence);
        }
        match control.inst {
            ControlInst::None => {},
            inst => self.instructions.push(inst),
        };
    }
pub fn apply ( & mut self , control : Control ) { if self . count . is_none ( ) { self . count = Some ( control . count ) ; } if let Some ( ref mut count ) = self . count { assert ! ( count 0 " " ) ; * count -= 1 ; } if let Some ( sequence ) = self . sequence { assert_eq ! ( sequence control sequence " " ) ; } else { self . sequence = Some ( control . sequence ) ; } match control . inst { ControlInst :: None => { } , inst => self . instructions . push ( inst ) , } ; }
Add a new `Control` to this builder.
Add a new ` Control ` to this builder .
&mut self
control
Control
&mut self
control
Control