pub fn push(&mut self, value: bool) {
        debug_assert_eq!(self.vec.len(), blocks_required::<T>(self.len));
        if self.len % bits_per_block::<T>() == 0 {
            self.vec.push(T::zero());
        }
        let i = self.len;
        self.len = i.checked_add(1).expect("Overflow detected");
        self.set(i, value);
    }
/// Appends a bool to the back of the Vob.
///
/// # Examples
/// ```
/// use vob::Vob;
/// let mut v = Vob::new();
/// v.push(true);
/// v.push(false);
/// assert_eq!(v.get(0), Some(true));
/// assert_eq!(v.get(1), Some(false));
/// ```
Appends a bool to the back of the Vob.
Appends a bool to the back of the Vob .
pub fn push(&mut self, value: bool) {
        debug_assert_eq!(self.vec.len(), blocks_required::<T>(self.len));
        if self.len % bits_per_block::<T>() == 0 {
            self.vec.push(T::zero());
        }
        let i = self.len;
        self.len = i.checked_add(1).expect("Overflow detected");
        self.set(i, value);
    }
pub fn push ( & mut self , value : bool ) { debug_assert_eq ! ( self vec len ( ) blocks_required T ( self len ) ) ; if self . len % bits_per_block :: < T > ( ) == 0 { self . vec . push ( T :: zero ( ) ) ; } let i = self . len ; self . len = i . checked_add ( 1 ) . expect ( " " ) ; self . set ( i , value ) ; }
Appends a bool to the back of the Vob.
Appends a bool to the back of the Vob .
&mut self
value
bool
&mut self
value
bool
examples
None