Debian Codegraph @

/

debian rust-http-content-range 0.2.5-1debian librust-http-content-range-dev debian librust-http-content-range+default-dev debian librust-http-content-range-0-dev debian librust-http-content-range-0+default-dev debian librust-http-content-range-0.2-dev debian librust-http-content-range-0.2+default-dev debian librust-http-content-range-0.2.5-dev debian librust-http-content-range-0.2.5+default-dev cargo http-content-range 0.2.5 debianjsonmakefilemarkdownrustrust-c-abishelltomlyaml 23 files · 128 symbols
View dependency graph

Depends on

  • dh-cargo (dh-sequence-cargo)
  • cargo, debhelper-compat, libstd-rust-dev, rustc
README (full)

http-content-range

GitHub repo crates.io version crate usage docs.rs status crates.io license CI build status Codecov

Tiny Rust lib to decode Content-Range response headers.

use http_content_range::ContentRange;

let value = ContentRange::parse("bytes 42-69/420");

match value.expect("Failed to parse Content-Range") {
    ContentRange::Bytes(r) => {
        println!(
            "First_byte={}, last_byte={}, complete_length={}",
            r.first_byte, r.last_byte, r.complete_length,
        );
    }
    ContentRange::UnboundBytes(r) => {
        println!(
            "First_byte={}, last_byte={}, complete_length is unknown",
            r.first_byte, r.last_byte
        );
    }
    ContentRange::Unsatisfied(r) => {
        println!(
            "Unsatisfied response, complete_length={}",
            r.complete_length
        );
    }
};

Development

  • This project is easier to develop with just, a modern alternative to make. Install it with cargo install just.
  • To get a list of available commands, run just.
  • To run tests, use just test.

Credits

The code was inspired by the rust-http-range crate.

License

Licensed under either of

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual-licensed as above, without any additional terms or conditions.

dir debian/
dir src/
file .cargo_vcs_info.json
file .editorconfig
file .pre-commit-config.yaml
file CHANGELOG.md
file Cargo.lock
file Cargo.toml
file Cargo.toml.orig
file LICENSE-APACHE
file LICENSE-MIT
file README.md
file clippy.toml
file codecov.yml
file release-plz.toml
file tomlfmt.toml