pub trait VersionParser {
    // Required method
    fn parse_version<B: AsRef<[u8]>>(
        &self,
        input: B
    ) -> Result<Version, ParserError>;
}
Expand description

Parse a UTF-8 slice of bytes to a Version.

Required Methods§

source

fn parse_version<B: AsRef<[u8]>>( &self, input: B ) -> Result<Version, ParserError>

Parse a UTF-8 formatted input buffer, input to a Version. This version may be a BaseVersion, or a FullVersion.

If the version type is known in advance, or you require a specifically a base- or full version, you may instead use BaseVersionParser::parse_base or FullVersionParser::parse_full.

Implementors§