pub struct Response { /* private fields */ }Expand description
Response from the API
Implementations§
source§impl Response
impl Response
sourcepub async fn obj<T: DeserializeOwned>(self) -> Result<T, GHError>
pub async fn obj<T: DeserializeOwned>(self) -> Result<T, GHError>
Fetch a single JSON object from the API
sourcepub fn array<T: DeserializeOwned + Unpin + 'static>(
self
) -> impl Stream<Item = Result<T, GHError>>
pub fn array<T: DeserializeOwned + Unpin + 'static>(
self
) -> impl Stream<Item = Result<T, GHError>>
Stream an array of objects from the API
sourcepub fn status(&self) -> StatusCode
pub fn status(&self) -> StatusCode
Response status