pub fn take_frame(&mut self, mut index: usize) -> Option<P::FrameType> {
        // Invalid index given
        if index < self.frame_offset {
            return None;
        }

        index -= self.frame_offset;

        // Message does not (yet) exist
        if self.frames.len() <= index {
            return None;
        }

        let frame = self.frames[index].take();
        if frame.is_some() {
            self.frame_count -= 1;
        }

        if self.frame_count == 0 {
            self.frame_offset += self.frames.len();
            self.frames.clear();
        }

        frame
    }
/// Takes the frame at the given index
Takes the frame at the given index
Takes the frame at the given index
pub fn take_frame(&mut self, mut index: usize) -> Option<P::FrameType> {
        // Invalid index given
        if index < self.frame_offset {
            return None;
        }
        index -= self.frame_offset;
        // Message does not (yet) exist
        if self.frames.len() <= index {
            return None;
        }
        let frame = self.frames[index].take();
        if frame.is_some() {
            self.frame_count -= 1;
        }
        if self.frame_count == 0 {
            self.frame_offset += self.frames.len();
            self.frames.clear();
        }
        frame
    }
pub fn take_frame ( & mut self , mut index : usize ) -> Option < P :: FrameType > { // Invalid index given if index < self . frame_offset { return None ; } index -= self . frame_offset ; // Message does not (yet) exist if self . frames . len ( ) <= index { return None ; } let frame = self . frames [ index ] . take ( ) ; if frame . is_some ( ) { self . frame_count -= 1 ; } if self . frame_count == 0 { self . frame_offset += self . frames . len ( ) ; self . frames . clear ( ) ; } frame }
Takes the frame at the given index
Takes the frame at the given index
&mut self
index
usize
&mut self
index
usize