Struct buhtig::Client

source ·
pub struct Client { /* private fields */ }

Implementations§

source§

impl Client

source

pub fn new<T: CredentialsProvider>(credentials: &T) -> Result<Self>

Create a new GithubClient using a credentials provider.

Errors

Returns an error parsing credentials or configuring the HTTP client.

Trait Implementations§

source§

impl Commits for Client

source§

fn list_commits<'life0, 'async_trait>( &'life0 self, input: ListCommitsRequest ) -> Pin<Box<dyn Future<Output = Result<Vec<ListCommitsResponse>>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

source§

impl Debug for Client

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Git for Client

source§

fn get_blob<'life0, 'async_trait>( &'life0 self, input: GetBlobRequest ) -> Pin<Box<dyn Future<Output = Result<GetBlobResponse>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

Get the contents of a file at a given commit.

A Git blob (binary large object) is the object type used to store the contents of each file in a repository. The file’s SHA-1 hash is computed and stored in the blob object. These endpoints allow you to read and write blob objects to your Git database on GitHub. Blobs leverage these custom media types. You can read more about the use of media types in the API here.use crate::{Client, SortDirection, User};

source§

impl Pulls for Client

source§

fn list_pull_requests<'life0, 'async_trait>( &'life0 self, input: ListPullRequestsRequest ) -> Pin<Box<dyn Future<Output = Result<ListPullRequestsResponse>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

source§

fn list_reviews_for_pull_request<'life0, 'async_trait>( &'life0 self, input: ListReviewsForPullRequestRequest ) -> Pin<Box<dyn Future<Output = Result<ListReviewsForPullRequestResponse>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

source§

impl Repositories for Client

source§

fn get_commit<'life0, 'async_trait>( &'life0 self, input: GetCommitRequest ) -> Pin<Box<dyn Future<Output = Result<GetCommitResponse>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

Get a commit from a repository.

source§

fn get_repository_content<'life0, 'async_trait>( &'life0 self, input: GetRepositoryContentRequest ) -> Pin<Box<dyn Future<Output = Result<Option<GetRepositoryContentResponse>>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

Get the content of a path at a given commit.

TODO: Support getting directories in addition to files and symlinks.

source§

fn list_repositories<'life0, 'async_trait>( &'life0 self, input: ListRepositoriesRequest ) -> Pin<Box<dyn Future<Output = Result<ListRepositoriesResponse>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

source§

impl Teams for Client

source§

fn get_team_by_name<'life0, 'async_trait>( &'life0 self, input: GetTeamByNameRequest ) -> Pin<Box<dyn Future<Output = Result<GetTeamByNameResponse>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

source§

fn list_team_repositories<'life0, 'async_trait>( &'life0 self, input: ListTeamRepositoriesRequest ) -> Pin<Box<dyn Future<Output = Result<ListTeamRepositoriesResponse>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

source§

fn list_team_members<'life0, 'async_trait>( &'life0 self, input: ListTeamMembersRequest ) -> Pin<Box<dyn Future<Output = Result<ListTeamMembersResponse>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

source§

impl Users for Client

source§

fn get_authenticated_user<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = Result<GetAuthenticatedUserResponse>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

Retrieve the currently authenticated user.

Auto Trait Implementations§

§

impl !RefUnwindSafe for Client

§

impl Send for Client

§

impl Sync for Client

§

impl Unpin for Client

§

impl !UnwindSafe for Client

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere U: From<T>,

const: unstable · source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
const: unstable · source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for Twhere V: MultiLane<T>,

§

fn vzip(self) -> V

source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more