Skip to content

Commit

Permalink
docs(lib): fix rustdoc warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeGomez authored and seanmonstar committed Nov 10, 2017
1 parent fe38aa4 commit e330d30
Show file tree
Hide file tree
Showing 55 changed files with 237 additions and 72 deletions.
4 changes: 3 additions & 1 deletion src/header/common/accept.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ header! {
/// in-line image
///
/// # ABNF
/// ```plain
///
/// ```text
/// Accept = #( media-range [ accept-params ] )
///
/// media-range = ( "*/*"
Expand Down Expand Up @@ -40,6 +41,7 @@ header! {
/// ])
/// );
/// ```
///
/// ```
/// use hyper::header::{Headers, Accept, qitem};
/// use hyper::mime;
Expand Down
3 changes: 2 additions & 1 deletion src/header/common/accept_charset.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ header! {
/// those charsets.
///
/// # ABNF
/// ```plain
///
/// ```text
/// Accept-Charset = 1#( ( charset / "*" ) [ weight ] )
/// ```
///
Expand Down
3 changes: 2 additions & 1 deletion src/header/common/accept_encoding.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ header! {
/// preferred.
///
/// # ABNF
/// ```plain
///
/// ```text
/// Accept-Encoding = #( codings [ weight ] )
/// codings = content-coding / "identity" / "*"
/// ```
Expand Down
5 changes: 4 additions & 1 deletion src/header/common/accept_language.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ header! {
/// response.
///
/// # ABNF
/// ```plain
///
/// ```text
/// Accept-Language = 1#( language-range [ weight ] )
/// language-range = <language-range, see [RFC4647], Section 2.1>
/// ```
Expand All @@ -20,6 +21,7 @@ header! {
/// * `en-us;q=1.0, en;q=0.5, fr`
///
/// # Examples
///
/// ```
/// use hyper::header::{Headers, AcceptLanguage, LanguageTag, qitem};
///
Expand All @@ -33,6 +35,7 @@ header! {
/// ])
/// );
/// ```
///
/// ```
/// # extern crate hyper;
/// # #[macro_use] extern crate language_tags;
Expand Down
8 changes: 6 additions & 2 deletions src/header/common/accept_ranges.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ header! {
/// supports range requests for the target resource.
///
/// # ABNF
/// ```plain
///
/// ```text
/// Accept-Ranges = acceptable-ranges
/// acceptable-ranges = 1#range-unit / \"none\"
///
Expand All @@ -26,12 +27,14 @@ header! {
/// let mut headers = Headers::new();
/// headers.set(AcceptRanges(vec![RangeUnit::Bytes]));
/// ```
///
/// ```
/// use hyper::header::{Headers, AcceptRanges, RangeUnit};
///
/// let mut headers = Headers::new();
/// headers.set(AcceptRanges(vec![RangeUnit::None]));
/// ```
///
/// ```
/// use hyper::header::{Headers, AcceptRanges, RangeUnit};
///
Expand Down Expand Up @@ -62,7 +65,8 @@ header! {
/// representation's media type.
///
/// # ABNF
/// ```plain
///
/// ```text
/// range-unit = bytes-unit / other-range-unit
/// bytes-unit = "bytes"
/// other-range-unit = token
Expand Down
4 changes: 3 additions & 1 deletion src/header/common/access_control_allow_credentials.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ use header::{Header, Raw};
/// > match the following ABNF:
///
/// # ABNF
/// ```plain
///
/// ```text
/// Access-Control-Allow-Credentials: "Access-Control-Allow-Credentials" ":" "true"
/// ```
///
Expand All @@ -25,6 +26,7 @@ use header::{Header, Raw};
/// * "true"
///
/// # Examples
///
/// ```
/// # extern crate hyper;
/// # fn main() {
Expand Down
5 changes: 4 additions & 1 deletion src/header/common/access_control_allow_headers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,16 @@ header! {
/// during the actual request.
///
/// # ABNF
/// ```plain
///
/// ```text
/// Access-Control-Allow-Headers: "Access-Control-Allow-Headers" ":" #field-name
/// ```
///
/// # Example values
/// * `accept-language, date`
///
/// # Examples
///
/// ```
/// # extern crate hyper;
/// # extern crate unicase;
Expand All @@ -32,6 +34,7 @@ header! {
/// );
/// # }
/// ```
///
/// ```
/// # extern crate hyper;
/// # extern crate unicase;
Expand Down
5 changes: 4 additions & 1 deletion src/header/common/access_control_allow_methods.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,16 @@ header! {
/// actual request.
///
/// # ABNF
/// ```plain
///
/// ```text
/// Access-Control-Allow-Methods: "Access-Control-Allow-Methods" ":" #Method
/// ```
///
/// # Example values
/// * `PUT, DELETE, XMODIFY`
///
/// # Examples
///
/// ```
/// use hyper::header::{Headers, AccessControlAllowMethods};
/// use hyper::Method;
Expand All @@ -26,6 +28,7 @@ header! {
/// AccessControlAllowMethods(vec![Method::Get])
/// );
/// ```
///
/// ```
/// use hyper::header::{Headers, AccessControlAllowMethods};
/// use hyper::Method;
Expand Down
5 changes: 3 additions & 2 deletions src/header/common/access_control_allow_origin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@ use header::{Header, Raw};
///
/// The `Access-Control-Allow-Origin` header indicates whether a resource
/// can be shared based by returning the value of the Origin request header,
/// "*", or "null" in the response.
/// `*`, or `null` in the response.
///
/// # ABNF
/// ```plain
///
/// ```text
/// Access-Control-Allow-Origin = "Access-Control-Allow-Origin" ":" origin-list-or-null | "*"
/// ```
///
Expand Down
5 changes: 4 additions & 1 deletion src/header/common/access_control_expose_headers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,16 @@ header! {
/// API of a CORS API specification.
///
/// # ABNF
/// ```plain
///
/// ```text
/// Access-Control-Expose-Headers = "Access-Control-Expose-Headers" ":" #field-name
/// ```
///
/// # Example values
/// * `ETag, Content-Length`
///
/// # Examples
///
/// ```
/// # extern crate hyper;
/// # extern crate unicase;
Expand All @@ -34,6 +36,7 @@ header! {
/// );
/// # }
/// ```
///
/// ```
/// # extern crate hyper;
/// # extern crate unicase;
Expand Down
5 changes: 4 additions & 1 deletion src/header/common/access_control_max_age.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,17 @@ header! {
/// preflight request can be cached in a preflight result cache.
///
/// # ABNF
/// ```plain
///
/// ```text
/// Access-Control-Max-Age = \"Access-Control-Max-Age\" \":\" delta-seconds
/// ```
///
/// # Example values
///
/// * `531`
///
/// # Examples
///
/// ```
/// use hyper::header::{Headers, AccessControlMaxAge};
///
Expand Down
5 changes: 4 additions & 1 deletion src/header/common/access_control_request_headers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,16 @@ header! {
/// during the actual request.
///
/// # ABNF
/// ```plain
///
/// ```text
/// Access-Control-Allow-Headers: "Access-Control-Allow-Headers" ":" #field-name
/// ```
///
/// # Example values
/// * `accept-language, date`
///
/// # Examples
///
/// ```
/// # extern crate hyper;
/// # extern crate unicase;
Expand All @@ -32,6 +34,7 @@ header! {
/// );
/// # }
/// ```
///
/// ```
/// # extern crate hyper;
/// # extern crate unicase;
Expand Down
4 changes: 3 additions & 1 deletion src/header/common/access_control_request_method.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,16 @@ header! {
/// The `Access-Control-Request-Method` header indicates which method will be
/// used in the actual request as part of the preflight request.
/// # ABNF
/// ```plain
///
/// ```text
/// Access-Control-Request-Method: \"Access-Control-Request-Method\" \":\" Method
/// ```
///
/// # Example values
/// * `GET`
///
/// # Examples
///
/// ```
/// use hyper::header::{Headers, AccessControlRequestMethod};
/// use hyper::Method;
Expand Down
5 changes: 4 additions & 1 deletion src/header/common/allow.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ header! {
/// with the resource.
///
/// # ABNF
/// ```plain
///
/// ```text
/// Allow = #method
/// ```
///
Expand All @@ -19,6 +20,7 @@ header! {
/// * ``
///
/// # Examples
///
/// ```
/// use hyper::header::{Headers, Allow};
/// use hyper::Method;
Expand All @@ -28,6 +30,7 @@ header! {
/// Allow(vec![Method::Get])
/// );
/// ```
///
/// ```
/// use hyper::header::{Headers, Allow};
/// use hyper::Method;
Expand Down
5 changes: 4 additions & 1 deletion src/header/common/authorization.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ use header::{Header, Raw};
/// agent for the realm of the resource being requested.
///
/// # ABNF
/// ```plain
///
/// ```text
/// Authorization = credentials
/// ```
///
Expand All @@ -23,6 +24,7 @@ use header::{Header, Raw};
/// * `Bearer fpKL54jvWmEGVoRdCNjG`
///
/// # Examples
///
/// ```
/// use hyper::header::{Headers, Authorization};
///
Expand All @@ -42,6 +44,7 @@ use header::{Header, Raw};
/// )
/// );
/// ```
///
/// ```
/// use hyper::header::{Headers, Authorization, Bearer};
///
Expand Down
5 changes: 4 additions & 1 deletion src/header/common/cache_control.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,14 @@ use header::parsing::{from_comma_delimited, fmt_comma_delimited};
/// not imply that the same directive is to be given in the response.
///
/// # ABNF
/// ```plain
///
/// ```text
/// Cache-Control = 1#cache-directive
/// cache-directive = token [ "=" ( token / quoted-string ) ]
/// ```
///
/// # Example values
///
/// * `no-cache`
/// * `private, community="UCI"`
/// * `max-age=30`
Expand All @@ -30,6 +32,7 @@ use header::parsing::{from_comma_delimited, fmt_comma_delimited};
/// CacheControl(vec![CacheDirective::MaxAge(86400u32)])
/// );
/// ```
///
/// ```
/// use hyper::header::{Headers, CacheControl, CacheDirective};
///
Expand Down
5 changes: 4 additions & 1 deletion src/header/common/connection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ header! {
/// message.
///
/// # ABNF
/// ```plain
///
/// ```text
/// Connection = 1#connection-option
/// connection-option = token
///
Expand All @@ -70,12 +71,14 @@ header! {
/// ```
///
/// # Examples
///
/// ```
/// use hyper::header::{Headers, Connection};
///
/// let mut headers = Headers::new();
/// headers.set(Connection::keep_alive());
/// ```
///
/// ```
/// # extern crate hyper;
/// # extern crate unicase;
Expand Down
Loading

0 comments on commit e330d30

Please sign in to comment.