style(headers): use regular doc-comments inside macros
A bug (rust-lang/rust#23812) in rustc prevented the use of normal comments inside macros but this has been fixed.
This commit is contained in:
@@ -2,33 +2,33 @@ use std::fmt;
|
||||
|
||||
use header::{HeaderFormat, Header, parsing};
|
||||
|
||||
#[doc="`Content-Length` header, defined in"]
|
||||
#[doc="[RFC7230](http://tools.ietf.org/html/rfc7230#section-3.3.2)"]
|
||||
#[doc=""]
|
||||
#[doc="When a message does not have a `Transfer-Encoding` header field, a"]
|
||||
#[doc="Content-Length header field can provide the anticipated size, as a"]
|
||||
#[doc="decimal number of octets, for a potential payload body. For messages"]
|
||||
#[doc="that do include a payload body, the Content-Length field-value"]
|
||||
#[doc="provides the framing information necessary for determining where the"]
|
||||
#[doc="body (and message) ends. For messages that do not include a payload"]
|
||||
#[doc="body, the Content-Length indicates the size of the selected"]
|
||||
#[doc="representation."]
|
||||
#[doc=""]
|
||||
#[doc="# ABNF"]
|
||||
#[doc="```plain"]
|
||||
#[doc="Content-Length = 1*DIGIT"]
|
||||
#[doc="```"]
|
||||
#[doc=""]
|
||||
#[doc="# Example values"]
|
||||
#[doc="* `3495`"]
|
||||
#[doc=""]
|
||||
#[doc="# Example"]
|
||||
#[doc="```"]
|
||||
#[doc="use hyper::header::{Headers, ContentLength};"]
|
||||
#[doc=""]
|
||||
#[doc="let mut headers = Headers::new();"]
|
||||
#[doc="headers.set(ContentLength(1024u64));"]
|
||||
#[doc="```"]
|
||||
/// `Content-Length` header, defined in
|
||||
/// [RFC7230](http://tools.ietf.org/html/rfc7230#section-3.3.2)
|
||||
///
|
||||
/// When a message does not have a `Transfer-Encoding` header field, a
|
||||
/// Content-Length header field can provide the anticipated size, as a
|
||||
/// decimal number of octets, for a potential payload body. For messages
|
||||
/// that do include a payload body, the Content-Length field-value
|
||||
/// provides the framing information necessary for determining where the
|
||||
/// body (and message) ends. For messages that do not include a payload
|
||||
/// body, the Content-Length indicates the size of the selected
|
||||
/// representation.
|
||||
///
|
||||
/// # ABNF
|
||||
/// ```plain
|
||||
/// Content-Length = 1*DIGIT
|
||||
/// ```
|
||||
///
|
||||
/// # Example values
|
||||
/// * `3495`
|
||||
///
|
||||
/// # Example
|
||||
/// ```
|
||||
/// use hyper::header::{Headers, ContentLength};
|
||||
///
|
||||
/// let mut headers = Headers::new();
|
||||
/// headers.set(ContentLength(1024u64));
|
||||
/// ```
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub struct ContentLength(pub u64);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user