pub struct ApiClient { /* private fields */ }Expand description
GitHub REST API client.
Implementations§
Source§impl ApiClient
impl ApiClient
Sourcepub async fn request<R, D>(&self, request: &R) -> Result<D>where
R: ApiExt,
D: DeserializeOwned,
pub async fn request<R, D>(&self, request: &R) -> Result<D>where
R: ApiExt,
D: DeserializeOwned,
Send the given request.
Sourcepub async fn request_auto_retry<R, D>(&self, request: &R) -> D
pub async fn request_auto_retry<R, D>(&self, request: &R) -> D
Send the given request.
This function is infallible.
It will retry at most u16::MAX times.
If the target server is down or the deserialization fails current thread will be blocked.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ApiClient
impl !RefUnwindSafe for ApiClient
impl Send for ApiClient
impl Sync for ApiClient
impl Unpin for ApiClient
impl !UnwindSafe for ApiClient
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