pub fn push(&mut self, base: Base) {
        let b = u8::from(base);

        if self.len % 2 == 0 {
            self.seq.push(b << 4);
        } else if let Some(l) = self.seq.last_mut() {
            *l |= b;
        }

        self.len += 1;
    }
/// Appends a base to the end of the sequence.
///
/// # Examples
///
/// ```
/// use noodles_bam::record::{sequence::Base, Sequence};
///
/// let mut sequence = Sequence::new(vec![0x12, 0x40], 3); // ACG
///
/// sequence.push(Base::T);
/// assert_eq!(sequence.as_ref(), [0x12, 0x48]); // ACGT
/// assert_eq!(sequence.len(), 4);
///
/// sequence.push(Base::A);
/// assert_eq!(sequence.as_ref(), [0x12, 0x48, 0x10]); //ACGTA
/// assert_eq!(sequence.len(), 5);
/// ```
Appends a base to the end of the sequence.
Appends a base to the end of the sequence .
pub fn push(&mut self, base: Base) {
        let b = u8::from(base);
        if self.len % 2 == 0 {
            self.seq.push(b << 4);
        } else if let Some(l) = self.seq.last_mut() {
            *l |= b;
        }
        self.len += 1;
    }
pub fn push ( & mut self , base : Base ) { let b = u8 :: from ( base ) ; if self . len % 2 == 0 { self . seq . push ( b << 4 ) ; } else if let Some ( l ) = self . seq . last_mut ( ) { * l |= b ; } self . len += 1 ; }
Appends a base to the end of the sequence.
Appends a base to the end of the sequence .
&mut self
base
Base
&mut self
base
Base
examples
```
use noodles_bam::record::{sequence::Base, Sequence}.






` ` ` use noodles_bam :: record :: { sequence :: Base Sequence } .