MCPcopy Create free account
hub / github.com/06chaynes/http-cache / response_warning_code

Function response_warning_code

http-cache/src/lib.rs:1987–1993  ·  view source on GitHub ↗

Extracts the warning code from an `http::Response`'s warning header, if present. Returns the 3-digit warn-code as a `usize`.

(response: &Response<B>)

Source from the content-addressed store, hash-verified

1985 /// By default, a manager implementation with [`cacache`](https://github.com/zkat/cacache-rs)
1986 /// as the backend has been provided, see [`CACacheManager`].
1987 pub manager: T,
1988 /// Override the default cache options.
1989 pub options: HttpCacheOptions,
1990}
1991
1992/// Wrapper for user metadata stored in response extensions during cache reads.
1993/// Used to preserve metadata through 304 re-cache operations so that
1994/// `StreamingCacheManager::put` receives the original metadata instead of
1995/// regenerating it (which may produce different or empty results).
1996#[derive(Debug, Clone)]

Callers 1

runMethod · 0.85

Calls 1

getMethod · 0.45

Tested by

no test coverage detected