pub trait Parser {
// Required method
fn parse(buf: &[u8]) -> Result<(&[u8], usize), ParseError>;
}
Required Methods§
sourcefn parse(buf: &[u8]) -> Result<(&[u8], usize), ParseError>
fn parse(buf: &[u8]) -> Result<(&[u8], usize), ParseError>
Parse a URC, if it exists.
- if no URC exists, return ParseError::NoMatch
- if a URC exists but is incomplete, return ParseError::Incomplete
- if a URC exists and is complete, return it and its length
Object Safety§
This trait is not object safe.