kvarn::prelude::parse

Enum CacheControlError

source
pub enum CacheControlError {
    MultipleMaxAge,
    InvalidInteger,
    InvalidUnit,
    InvalidKeyword,
    InvalidBytes,
}
Expand description

An error with parsing CacheControl.

Variants§

§

MultipleMaxAge

Multiple max-age directives were found.

There must only be one; else you can’t decide which to honour.

§

InvalidInteger

Could not parse integer in max-age or Kvarn cache control header.

§

InvalidUnit

The unit in the kvarn-cache-control header is invalid.

For now, valid units are

  • s for seconds
  • m for minutes
  • h for hours
  • d for days
§

InvalidKeyword

The kvarn-cache-control header is a keyword, but it is invalid.

For now, valid keywords are

  • none for no caching
  • and