pub struct GitHubClient { /* private fields */ }Expand description
Low-level GitHub API client with connection pooling.
Handles HTTP requests, authentication, and rate limiting.
For most use cases, prefer using GitHubService instead.
Implementations§
Source§impl GitHubClient
impl GitHubClient
Sourcepub fn new() -> Result<Self>
pub fn new() -> Result<Self>
Creates a new GitHub API client with connection pooling and optional token authentication.
Automatically detects GITHUB_TOKEN from environment variables.
The token is stored securely using SecretString and is automatically
zeroized when the client is dropped.
pub fn has_token(&self) -> bool
pub fn client(&self) -> &Client
pub async fn check_rate_limit(&self) -> Result<RateLimit>
Trait Implementations§
Source§impl Clone for GitHubClient
impl Clone for GitHubClient
Source§fn clone(&self) -> GitHubClient
fn clone(&self) -> GitHubClient
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for GitHubClient
impl !RefUnwindSafe for GitHubClient
impl Send for GitHubClient
impl Sync for GitHubClient
impl Unpin for GitHubClient
impl !UnwindSafe for GitHubClient
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