fn push(&mut self, value: Self::Elem) -> Result<(), crate::StackError> {
        self.t = std::mem::replace(
            &mut self.z,
            std::mem::replace(&mut self.y, std::mem::replace(&mut self.x, value)),
        );
        Ok(())
    }
/// Move a value into the X register, dropping the T register.
///
/// # Example
///
/// ```
/// use smsflib::prelude::*;
///
/// let mut stack = ClassicStack::<u32>::new(1, 2, 3, 4);
/// let res = stack.push(10);
///
/// assert_eq!(res, Ok(()));
///
/// assert_eq!(*stack.x(), 10);
/// assert_eq!(*stack.y(), 1);
/// assert_eq!(*stack.z(), 2);
/// assert_eq!(*stack.t(), 3);
/// ```
Move a value into the X register, dropping the T register.
Move a value into the X register dropping the T register .
fn push(&mut self, value: Self::Elem) -> Result<(), crate::StackError> {
        self.t = std::mem::replace(
            &mut self.z,
            std::mem::replace(&mut self.y, std::mem::replace(&mut self.x, value)),
        );
        Ok(())
    }
fn push ( & mut self , value : Self :: Elem ) -> Result < ( ) , crate :: StackError > { self . t = std :: mem :: replace ( & mut self . z , std :: mem :: replace ( & mut self . y , std :: mem :: replace ( & mut self . x , value ) ) , ) ; Ok ( ( ) ) }
Move a value into the X register, dropping the T register.
Move a value into the X register dropping the T register .
&mut self
value
Self::Elem
example
```
use smsflib::prelude::*.

let mut stack = ClassicStack::::new(1, 2, 3, 4);
let res = stack.push(10).




` ` ` use smsflib :: prelude :: * . let mut stack = ClassicStack :::: new ( 1 2 3 4 ) ; let res = stack . push ( 10 ) .