fn is_zxcrypt_superblock(block: &[u8]) -> Result<bool, Error> {
    if block.len() < 16 {
        return Err(anyhow!("block too small to contain superblock"));
    }
    Ok(block[0..16] == ZXCRYPT_MAGIC)
}
/// Given a slice representing the first block of a device, return true if this block has the
/// zxcrypt_magic as the first 16 bytes.
Given a slice representing the first block of a device, return true if this block has the
zxcrypt_magic as the first 16 bytes.
Given a slice representing the first block of a device return true if this block has the zxcrypt_magic as the first 16 bytes .
fn is_zxcrypt_superblock(block: &[u8]) -> Result<bool, Error> {
    if block.len() < 16 {
        return Err(anyhow!("block too small to contain superblock"));
    }
    Ok(block[0..16] == ZXCRYPT_MAGIC)
}
fn is_zxcrypt_superblock ( block : & [ u8 ] ) -> Result < bool , Error > { if block . len ( ) < 16 { return Err ( anyhow ! ( " " ) ) ; } Ok ( block [ 0 .. 16 ] == ZXCRYPT_MAGIC ) }
Given a slice representing the first block of a device, return true if this block has the
zxcrypt_magic as the first 16 bytes.
Given a slice representing the first block of a device return true if this block has the zxcrypt_magic as the first 16 bytes .
block
&[u8]
block
&[u8]