MCPcopy Create free account
hub / github.com/GlenDC/github-rust / populate

Method populate

src/response.rs:67–73  ·  view source on GitHub ↗

`populate` a `Rate ` object from the HTTP response header

(raw_header: &HttpHeaderType)

Source from the content-addressed store, hash-verified

65impl Populatable for Rate {
66 /// `populate` a `Rate<T>` object from the HTTP response header
67 fn populate(raw_header: &HttpHeaderType) -> Rate {
68 Rate {
69 limit: get_single_header_value(raw_header, "x-ratelimit-limit"),
70 remaining: get_single_header_value(raw_header, "x-ratelimit-remaining"),
71 reset: raw_header["x-ratelimit-reset"][0].clone(),
72 }
73 }
74}
75
76impl Populatable for Response {

Callers

nothing calls this directly

Calls 1

get_single_header_valueFunction · 0.85

Tested by

no test coverage detected