pub fn from_slice(buffer: &[u8]) -> Result<DBC, Error> {
        match parser::dbc(CompleteByteSlice(buffer)) {
            Ok((remaining, dbc)) => {
                if !remaining.is_empty() {
                    return Err(Error::Incomplete(dbc, remaining.as_bytes().to_vec()));
                }
                Ok(dbc)
            }
            Err(e) => Err(Error::NomError(e)),
        }
    }
/// Read a DBC from a buffer
Read a DBC from a buffer
Read a DBC from a buffer
pub fn from_slice(buffer: &[u8]) -> Result<DBC, Error> {
        match parser::dbc(CompleteByteSlice(buffer)) {
            Ok((remaining, dbc)) => {
                if !remaining.is_empty() {
                    return Err(Error::Incomplete(dbc, remaining.as_bytes().to_vec()));
                }
                Ok(dbc)
            }
            Err(e) => Err(Error::NomError(e)),
        }
    }
pub fn from_slice ( buffer : & [ u8 ] ) -> Result < DBC , Error > { match parser :: dbc ( CompleteByteSlice ( buffer ) ) { Ok ( ( remaining , dbc ) ) => { if ! remaining . is_empty ( ) { return Err ( Error :: Incomplete ( dbc , remaining . as_bytes ( ) . to_vec ( ) ) ) ; } Ok ( dbc ) } Err ( e ) => Err ( Error :: NomError ( e ) ) , } }
Read a DBC from a buffer
Read a DBC from a buffer
buffer
&[u8]