pub fn end(&mut self) -> Result<(), crate::Error> {
        // The stack must be on the root slot
        // It doesn't matter if the slot is
        // marked as done or not

        if self.inner.depth() == 0 {
            // Set the slot to done so it
            // can't be re-used without calling begin
            self.inner.current_mut().0 |= Slot::DONE;

            Ok(())
        } else {
            Err(crate::Error::custom(&"stack is not empty"))
        }
    }
/**
    Complete the stack.

    This stack may be re-used after being completed
    by calling `begin`.
    */
Complete the stack.
This stack may be re-used after being completed
by calling `begin`.
Complete the stack . This stack may be re - used after being completed by calling ` begin ` .
pub fn end(&mut self) -> Result<(), crate::Error> {
        // The stack must be on the root slot
        // It doesn't matter if the slot is
        // marked as done or not
        if self.inner.depth() == 0 {
            // Set the slot to done so it
            // can't be re-used without calling begin
            self.inner.current_mut().0 |= Slot::DONE;
            Ok(())
        } else {
            Err(crate::Error::custom(&"stack is not empty"))
        }
    }
pub fn end ( & mut self ) -> Result < ( ) , crate :: Error > { // The stack must be on the root slot // It doesn't matter if the slot is // marked as done or not if self . inner . depth ( ) == 0 { // Set the slot to done so it // can't be re-used without calling begin self . inner . current_mut ( ) . 0 |= Slot :: DONE ; Ok ( ( ) ) } else { Err ( crate :: Error :: custom ( & " " ) ) } }
Complete the stack.
Complete the stack .
&mut self