pub fn from_slice(slice: &[u8]) -> Result<Pmbr, LabelError> {
        let mut reader = Cursor::new(slice);
        let mbr: Pmbr =
            deserialize_from(&mut reader).context(DeserializeError {})?;

        if mbr.signature != [0x55, 0xaa] {
            return Err(LabelError::MbrSignature {});
        }

        Ok(mbr)
    }
/// converts a slice into a MBR and validates the signature
converts a slice into a MBR and validates the signature
converts a slice into a MBR and validates the signature
pub fn from_slice(slice: &[u8]) -> Result<Pmbr, LabelError> {
        let mut reader = Cursor::new(slice);
        let mbr: Pmbr =
            deserialize_from(&mut reader).context(DeserializeError {})?;
        if mbr.signature != [0x55, 0xaa] {
            return Err(LabelError::MbrSignature {});
        }
        Ok(mbr)
    }
pub fn from_slice ( slice : & [ u8 ] ) -> Result < Pmbr , LabelError > { let mut reader = Cursor :: new ( slice ) ; let mbr : Pmbr = deserialize_from ( & mut reader ) . context ( DeserializeError { } ) ? ; if mbr . signature != [ 0x55 , 0xaa ] { return Err ( LabelError :: MbrSignature { } ) ; } Ok ( mbr ) }
converts a slice into a MBR and validates the signature
converts a slice into a MBR and validates the signature
slice
&[u8]