#http #http-header #match

no-std etag

Simple ETag calculation implementation

12 stable releases (4 major)

4.0.0 Dec 21, 2022
3.0.0 Apr 25, 2021
2.0.6 Apr 24, 2021
2.0.5 Jul 17, 2020
0.1.0 Mar 15, 2017

#39 in No standard library

Download history 1612/week @ 2023-08-02 2534/week @ 2023-08-09 2809/week @ 2023-08-16 2621/week @ 2023-08-23 1870/week @ 2023-08-30 1875/week @ 2023-09-06 2707/week @ 2023-09-13 1927/week @ 2023-09-20 2265/week @ 2023-09-27 1893/week @ 2023-10-04 1725/week @ 2023-10-11 1811/week @ 2023-10-18 1989/week @ 2023-10-25 1535/week @ 2023-11-01 1424/week @ 2023-11-08 1686/week @ 2023-11-15

6,872 downloads per month
Used in 17 crates (6 directly)

BSL-1.0 license

14KB
198 lines

etag-rs

Build Crates.io Docs.rs

Simple EntityTag implementation.

Features

  • std - Add EntityTag::from_file_meta in order to generate ETag using file's metadata.

Usage

use etag::EntityTag;

fn main() {
    let my_tag = EntityTag::strong("lolka");
    let text_etag = my_tag.to_string();
    let parse_tag = text_etag.parse::<EntityTag>().unwrap();

    assert!(my_tag.strong_eq(&parse_tag));
}

lib.rs:

Simple EntityTag implementation, no_std friendly.

Features

  • std - Add EntityTag::from_file_meta in order to generate ETag using file's metadata.

Usage

use etag::EntityTag;

fn main() {
    let my_tag = EntityTag::strong("lolka");
    let text_etag = my_tag.to_string();
    let parse_tag = text_etag.parse::<EntityTag>().unwrap();

    assert!(my_tag.strong_eq(&parse_tag));
}

Dependencies

~110KB