pub fn parse(cursor: &mut Cursor<impl AsRef<[u8]>>) -> Result<Option<(Self, u64)>> {
        let initial = cursor.position();
        match Self::parse_internal(cursor) {
            ret @ Ok(None) => {
                cursor.set_position(initial);
                ret
            }
            ret => ret,
        }
    }
/// Parse a header from an input stream.
/// Returns `None` if insufficient data and does not consume anything in this case.
/// Payload size is returned along with the header.
Parse a header from an input stream.
Returns `None` if insufficient data and does not consume anything in this case.
Payload size is returned along with the header.
Parse a header from an input stream . Returns ` None ` if insufficient data and does not consume anything in this case . Payload size is returned along with the header .
pub fn parse(cursor: &mut Cursor<impl AsRef<[u8]>>) -> Result<Option<(Self, u64)>> {
        let initial = cursor.position();
        match Self::parse_internal(cursor) {
            ret @ Ok(None) => {
                cursor.set_position(initial);
                ret
            }
            ret => ret,
        }
    }
pub fn parse ( cursor : & mut Cursor < impl AsRef < [ u8 ] > > ) -> Result < Option < ( Self , u64 ) > > { let initial = cursor . position ( ) ; match Self :: parse_internal ( cursor ) { ret @ Ok ( None ) => { cursor . set_position ( initial ) ; ret } ret => ret , } }
Parse a header from an input stream.
Parse a header from an input stream .
cursor
&mut Cursor<impl AsRef<[u8]>>
cursor
&mut Cursor<impl AsRef<[u8]>>