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
Auto Trait Implementations§
impl !Freeze for Response
impl !RefUnwindSafe for Response
impl Send for Response
impl Sync for Response
impl Unpin for Response
impl !UnwindSafe for Response
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