pub(crate) fn fetch_str(&mut self) -> Result<&'a OsStr, DecodeError> {
        let len = self
            .bytes
            .iter()
            .position(|&b| b == b'\0')
            .ok_or(DecodeError::MissingNulCharacter)?;
        let bytes = self
            .fetch_bytes(len + 1)
            .expect("invalid null terminator position");
        let bytes = &bytes[..bytes.len() - 1];
        Ok(OsStr::from_bytes(bytes))
    }
/// Fetch a zero-terminated OS string by reference.
Fetch a zero-terminated OS string by reference.
Fetch a zero - terminated OS string by reference .
pub(crate) fn fetch_str(&mut self) -> Result<&'a OsStr, DecodeError> {
        let len = self
            .bytes
            .iter()
            .position(|&b| b == b'\0')
            .ok_or(DecodeError::MissingNulCharacter)?;
        let bytes = self
            .fetch_bytes(len + 1)
            .expect("invalid null terminator position");
        let bytes = &bytes[..bytes.len() - 1];
        Ok(OsStr::from_bytes(bytes))
    }
pub ( crate ) fn fetch_str ( & mut self ) -> Result < & ' a OsStr , DecodeError > { let len = self . bytes . iter ( ) . position ( | & b | b == b'\0' ) . ok_or ( DecodeError :: MissingNulCharacter ) ? ; let bytes = self . fetch_bytes ( len + 1 ) . expect ( " " ) ; let bytes = & bytes [ .. bytes . len ( ) - 1 ] ; Ok ( OsStr :: from_bytes ( bytes ) ) }
Fetch a zero-terminated OS string by reference.
Fetch a zero - terminated OS string by reference .
&mut self
&mut self