/// Shift Elements Right
///
/// - BUG: Do not shift more than the size of the stack, any more would cause a panic. If a shift of more than the size of the stack is required,
///  call this function multiple times.
Shift Elements Right
BUG: Do not shift more than the size of the stack, any more would cause a panic. If a shift of more than the size of the stack is required,
call this function multiple times.
Shift Elements Right BUG : Do not shift more than the size of the stack any more would cause a panic . If a shift of more than the size of the stack is required call this function multiple times .
pub fn shr(&mut self, count:usize){
        if let Some(ptr) = self.d_buf{
            for i in 0..(self.capacity - N){
                if (self.capacity as i32 - N as i32 - i as i32- count as i32 - 1) >= 0{
                    unsafe{ *ptr.offset((self.capacity - N - i - 1) as isize) = (*ptr.offset((self.capacity - N - i - count - 1) as isize)).clone()};
                }
            }
            for i in 0..count{
                unsafe { (*ptr.offset(i as isize)) = self.s_buf[(N as i32 - count as i32 + i as i32) as usize].clone()};
            }
        }
        self.s_buf.rotate_right(count);
        for i in 0..count{
            self.s_buf[i] = self.default.clone();
        }
    }
pub fn shr ( & mut self , count : usize ) { if let Some ( ptr ) = self . d_buf { for i in 0 .. ( self . capacity - N ) { if ( self . capacity as i32 - N as i32 - i as i32 - count as i32 - 1 ) >= 0 { unsafe { * ptr . offset ( ( self . capacity - N - i - 1 ) as isize ) = ( * ptr . offset ( ( self . capacity - N - i - count - 1 ) as isize ) ) . clone ( ) } ; } } for i in 0 .. count { unsafe { ( * ptr . offset ( i as isize ) ) = self . s_buf [ ( N as i32 - count as i32 + i as i32 ) as usize ] . clone ( ) } ; } } self . s_buf . rotate_right ( count ) ; for i in 0 .. count { self . s_buf [ i ] = self . default . clone ( ) ; } }
Shift Elements Right
 BUG: Do not shift more than the size of the stack, any more would cause a panic.
Shift Elements Right BUG : Do not shift more than the size of the stack any more would cause a panic .
&mut self
count
usize