pub fn from_bytes(buffer: &[u8]) -> Result<Cart, CartReadingError> {
        if buffer[0..4] == [0x4E, 0x45, 0x53, 0x1A] {
            Cart::from_ines(buffer)
        } else {
            Err(CartReadingError::UnrecognisedFormat)
        }
    }
/// Reads a buffer of bytes into a Cart,
/// detecting and parsing the format automatically.
Reads a buffer of bytes into a Cart,
detecting and parsing the format automatically.
Reads a buffer of bytes into a Cart detecting and parsing the format automatically .
pub fn from_bytes(buffer: &[u8]) -> Result<Cart, CartReadingError> {
        if buffer[0..4] == [0x4E, 0x45, 0x53, 0x1A] {
            Cart::from_ines(buffer)
        } else {
            Err(CartReadingError::UnrecognisedFormat)
        }
    }
pub fn from_bytes ( buffer : & [ u8 ] ) -> Result < Cart , CartReadingError > { if buffer [ 0 .. 4 ] == [ 0x4E , 0x45 , 0x53 , 0x1A ] { Cart :: from_ines ( buffer ) } else { Err ( CartReadingError :: UnrecognisedFormat ) } }
Reads a buffer of bytes into a Cart,
detecting and parsing the format automatically.
Reads a buffer of bytes into a Cart detecting and parsing the format automatically .
buffer
&[u8]
buffer
&[u8]