1
0
mirror of https://github.com/actix/actix-extras.git synced 2025-06-25 18:09:22 +02:00

Add missing API docs

These were written without much knowledge of the actix-web internals!
Please review carefully!
This commit is contained in:
Pascal Hertleif
2018-06-02 15:51:58 +02:00
parent 47b7be4fd3
commit 890a7e70d6
24 changed files with 82 additions and 2 deletions

View File

@ -35,6 +35,7 @@ header! {
}
impl Date {
/// Create a date instance set to the current system time
pub fn now() -> Date {
Date(SystemTime::now().into())
}

View File

@ -127,6 +127,7 @@ pub enum ContentEncoding {
impl ContentEncoding {
#[inline]
/// Is the content compressed?
pub fn is_compression(&self) -> bool {
match *self {
ContentEncoding::Identity | ContentEncoding::Auto => false,
@ -135,6 +136,7 @@ impl ContentEncoding {
}
#[inline]
/// Convert content encoding to string
pub fn as_str(&self) -> &'static str {
match *self {
#[cfg(feature = "brotli")]