pub struct GithubResponse {
pub response: Response<Bytes>,
pub rate_limit: RateLimit,
}Expand description
A GitHub API response and the rate-limit information it carried. This
crate does not classify a non-2xx status (other than a replayed 401):
the caller reads GithubResponse::status and decides.
Fields§
§response: Response<Bytes>The response, body and all.
rate_limit: RateLimitThe rate-limit headers that came with it.
Implementations§
Source§impl GithubResponse
impl GithubResponse
Sourcepub fn status(&self) -> StatusCode
pub fn status(&self) -> StatusCode
The status.
Sourcepub fn not_modified(&self) -> bool
pub fn not_modified(&self) -> bool
Whether GitHub answered 304 Not Modified — the recognisable outcome
of a conditional GET sent with with_etag.
Auto Trait Implementations§
impl !Freeze for GithubResponse
impl !RefUnwindSafe for GithubResponse
impl !UnwindSafe for GithubResponse
impl Send for GithubResponse
impl Sync for GithubResponse
impl Unpin for GithubResponse
impl UnsafeUnpin for GithubResponse
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more