pub fn current_all<'a>(&'a self) -> io::Result<Option<(QueueItem<'a>, QueueItemType)>> {
        match self.error {
            None => match self.section {
                Some(ref s) => s.current().map(|m| {
                    m.map(|i| {
                        (
                            QueueItem {
                                id: offset_encode(&self.component, i.id),
                                data: i.data,
                            },
                            if i.truncated {
                                QueueItemType::Truncated
                            } else {
                                QueueItemType::Regular
                            },
                        )
                    })
                }),
                None => Ok(None),
            },

            Some(ref e) => {
                // @FIXME not sure to_string is the best here, but this
                //        needs to clone arbitrary errors, so not sure
                //        there is anything better
                Err(io::Error::new(e.kind(), e.to_string()))
            }
        }
    }
/// Returns the current element with its type.
Returns the current element with its type.
Returns the current element with its type .
pub fn current_all<'a>(&'a self) -> io::Result<Option<(QueueItem<'a>, QueueItemType)>> {
        match self.error {
            None => match self.section {
                Some(ref s) => s.current().map(|m| {
                    m.map(|i| {
                        (
                            QueueItem {
                                id: offset_encode(&self.component, i.id),
                                data: i.data,
                            },
                            if i.truncated {
                                QueueItemType::Truncated
                            } else {
                                QueueItemType::Regular
                            },
                        )
                    })
                }),
                None => Ok(None),
            },
            Some(ref e) => {
                // @FIXME not sure to_string is the best here, but this
                //        needs to clone arbitrary errors, so not sure
                //        there is anything better
                Err(io::Error::new(e.kind(), e.to_string()))
            }
        }
    }
pub fn current_all < ' a > ( & ' a self ) -> io :: Result < Option < ( QueueItem < ' a > , QueueItemType ) > > { match self . error { None => match self . section { Some ( ref s ) => s . current ( ) . map ( | m | { m . map ( | i | { ( QueueItem { id : offset_encode ( & self . component , i . id ) , data : i . data , } , if i . truncated { QueueItemType :: Truncated } else { QueueItemType :: Regular } , ) } ) } ) , None => Ok ( None ) , } , Some ( ref e ) => { // @FIXME not sure to_string is the best here, but this //        needs to clone arbitrary errors, so not sure //        there is anything better Err ( io :: Error :: new ( e . kind ( ) , e . to_string ( ) ) ) } } }
Returns the current element with its type.
Returns the current element with its type .
&'a self
&'a self