Struct uhttp_version::HttpVersion [] [src]

pub struct HttpVersion {
    pub major: u8,
    pub minor: u8,
}

HTTP start line version field [RFC7230§2.6].

Fields

Major version number.

Minor version number.

Methods

impl HttpVersion
[src]

Create a new HttpVersion from the given major and minor version parts.

Try to parse an HttpVersion from the given bytes in the form required by the request line syntax.

This verifies the syntax is well-formed and extracts the version parts.

Trait Implementations

impl Copy for HttpVersion
[src]

impl Clone for HttpVersion
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Eq for HttpVersion
[src]

impl PartialEq for HttpVersion
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Debug for HttpVersion
[src]

Formats the value using the given formatter.

impl Hash for HttpVersion
[src]

Feeds this value into the given [Hasher]. Read more

Feeds a slice of this type into the given [Hasher]. Read more

impl Display for HttpVersion
[src]

Writes the version string in the form required by the HTTP status line.

Formats the value using the given formatter. Read more

impl FromStr for HttpVersion
[src]

The associated error which can be returned from parsing.

Parses a string s to return a value of this type. Read more