/// Reads an `u64` value from the wrapped byte sequence and returns it.
///
/// # Example
/// ```rust
/// # use sshcerts::ssh::Reader;
/// let data = vec![0, 0, 0, 0, 0, 0, 0, 42];
/// let mut reader = Reader::new(&data);
/// let num = reader.read_u64().unwrap();
/// assert_eq!(num, 42);
/// ```
Reads an `u64` value from the wrapped byte sequence and returns it.
Reads an ` u64 ` value from the wrapped byte sequence and returns it .
pub fn read_u64(&mut self) -> Result<u64> {
        if self.offset >= self.inner.len() {
            return Err(Error::UnexpectedEof);
        }
        let slice = &self.inner[self.offset..];
        if slice.len() < 8 {
            return Err(Error::InvalidFormat);
        }
        self.offset += 8;
        let value = u64::from_be_bytes(slice[..8].try_into().unwrap());
        Ok(value)
    }
pub fn read_u64 ( & mut self ) -> Result < u64 > { if self . offset >= self . inner . len ( ) { return Err ( Error :: UnexpectedEof ) ; } let slice = & self . inner [ self . offset .. ] ; if slice . len ( ) < 8 { return Err ( Error :: InvalidFormat ) ; } self . offset += 8 ; let value = u64 :: from_be_bytes ( slice [ .. 8 ] . try_into ( ) . unwrap ( ) ) ; Ok ( value ) }
Reads an `u64` value from the wrapped byte sequence and returns it.
Reads an ` u64 ` value from the wrapped byte sequence and returns it .
&mut self
<not_specific>
example
None
use sshcerts::ssh::reader;
None