pub fn frames(&mut self) -> Result<(&mut Frame, Option<&mut Frame>), StackError> {
        if self.len() == 0 {
            Err(StackError::End)
        } else {
            let (a, b) = self.0.split_at_mut(1);

            // should not panic because stack len must be more than 0
            let global = a.first_mut().expect("no global frame");
            let local = b.last_mut();

            Ok((global, local))
        }
    }
/// Get the global and local (current) frame.
/// If the stack has only one frame, it will be treated as the global frame and the local frame will be None.
Get the global and local (current) frame.
If the stack has only one frame, it will be treated as the global frame and the local frame will be None.
Get the global and local ( current ) frame . If the stack has only one frame it will be treated as the global frame and the local frame will be None .
pub fn frames(&mut self) -> Result<(&mut Frame, Option<&mut Frame>), StackError> {
        if self.len() == 0 {
            Err(StackError::End)
        } else {
            let (a, b) = self.0.split_at_mut(1);
            // should not panic because stack len must be more than 0
            let global = a.first_mut().expect("no global frame");
            let local = b.last_mut();
            Ok((global, local))
        }
    }
pub fn frames ( & mut self ) -> Result < ( & mut Frame , Option < & mut Frame > ) , StackError > { if self . len ( ) == 0 { Err ( StackError :: End ) } else { let ( a , b ) = self . 0 . split_at_mut ( 1 ) ; // should not panic because stack len must be more than 0 let global = a . first_mut ( ) . expect ( " " ) ; let local = b . last_mut ( ) ; Ok ( ( global , local ) ) } }
Get the global and local (current) frame.
Get the global and local ( current ) frame .
&mut self