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:
@ -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())
|
||||
}
|
||||
|
@ -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")]
|
||||
|
Reference in New Issue
Block a user