h10 0.6.10

Simple HTTP/1.0 Server
Documentation
use crate::http::headers::{HeaderEntry, HeaderName, HeaderValue, IntoHeader};

/// ### URI
/// Related: Content handling
///
///  The URI entity-header field may contain some or all of the Uniform Resource
/// Identifiers (Section 3.2) by which the Request-URI resource can be
/// identified. There is no guarantee that the resource can be accessed using
/// the URI(s) specified.
///
/// Reference: https://www.rfc-editor.org/rfc/rfc1945.html#appendix-D.2.6
///
#[derive(Debug)]
pub struct URI {
    name: HeaderName,
    value: HeaderValue,
}

impl IntoHeader for URI {
    fn into_header(self) -> HeaderEntry {
        let Self { name, value } = self;
        HeaderEntry { name, value }
    }
}