Struct SearchRepositoriesBuilder

Source
pub struct SearchRepositoriesBuilder {
Show 17 fields pub query: Option<String>, pub topic: Option<bool>, pub include_desc: Option<bool>, pub uid: Option<i64>, pub priority_owner_id: Option<i64>, pub team_id: Option<i64>, pub starred_by: Option<i64>, pub private: Option<bool>, pub is_private: Option<bool>, pub template: Option<bool>, pub archived: Option<bool>, pub mode: Option<String>, pub exclusive: Option<bool>, pub sort: Option<String>, pub order: Option<String>, pub page: Option<i32>, pub limit: Option<i32>,
}
Expand description

Options for searching repositories. All fields are optional.

Fields§

§query: Option<String>

Keyword to search for

§topic: Option<bool>

Limit search to repositories with keyword as topic

§include_desc: Option<bool>

Include search of keyword within repository description

§uid: Option<i64>

Search only for repos that the user with the given id owns or contributes to

§priority_owner_id: Option<i64>

Repo owner to prioritize in the results

§team_id: Option<i64>

Search only for repos that belong to the given team id

§starred_by: Option<i64>

Search only for repos that the user with the given id has starred

§private: Option<bool>

Include private repositories this user has access to (defaults to true)

§is_private: Option<bool>

Show only pubic, private or all repositories (defaults to all)

§template: Option<bool>

Include template repositories this user has access to (defaults to true)

§archived: Option<bool>

Show only archived, non-archived or all repositories (defaults to all)

§mode: Option<String>

Type of repository to search for. Supported values are “fork”, “source”, “mirror” and “collaborative”

§exclusive: Option<bool>

If uid is given, search only for repos that the user owns

§sort: Option<String>

Sort repos by attribute. Supported values are “alpha”, “created”, “updated”, “size”, and “id”. Default is “alpha”

§order: Option<String>

Sort order, either “asc” (ascending) or “desc” (descending). Default is “asc”, ignored if “sort” is not specified.

§page: Option<i32>

Page number of results to return (1-based)

§limit: Option<i32>

Page size of results

Implementations§

Source§

impl SearchRepositoriesBuilder

Source

pub fn query(self, query: impl Into<String>) -> Self

Keyword to search for

Source

pub fn topic(self, topic: impl Into<bool>) -> Self

Limit search to repositories with keyword as topic

Source

pub fn include_desc(self, include_desc: impl Into<bool>) -> Self

Include search of keyword within repository description

Source

pub fn uid(self, uid: impl Into<i64>) -> Self

Search only for repos that the user with the given id owns or contributes to

Source

pub fn priority_owner_id(self, priority_owner_id: impl Into<i64>) -> Self

Repo owner to prioritize in the results

Source

pub fn team_id(self, team_id: impl Into<i64>) -> Self

Search only for repos that belong to the given team id

Source

pub fn starred_by(self, starred_by: impl Into<i64>) -> Self

Search only for repos that the user with the given id has starred

Source

pub fn private(self, private: impl Into<bool>) -> Self

Include private repositories this user has access to (defaults to true)

Source

pub fn is_private(self, is_private: impl Into<bool>) -> Self

Show only pubic, private or all repositories (defaults to all)

Source

pub fn template(self, template: impl Into<bool>) -> Self

Include template repositories this user has access to (defaults to true)

Source

pub fn archived(self, archived: impl Into<bool>) -> Self

Show only archived, non-archived or all repositories (defaults to all)

Source

pub fn mode(self, mode: impl Into<String>) -> Self

Type of repository to search for. Supported values are “fork”, “source”, “mirror” and “collaborative”

Source

pub fn exclusive(self, exclusive: impl Into<bool>) -> Self

If uid is given, search only for repos that the user owns

Source

pub fn sort(self, sort: impl Into<String>) -> Self

Sort repos by attribute. Supported values are “alpha”, “created”, “updated”, “size”, and “id”. Default is “alpha”

Source

pub fn order(self, order: impl Into<String>) -> Self

Sort order, either “asc” (ascending) or “desc” (descending). Default is “asc”, ignored if “sort” is not specified.

Source

pub fn page(self, page: impl Into<i32>) -> Self

Page number of results to return (1-based)

Source

pub fn limit(self, limit: impl Into<i32>) -> Self

Page size of results

Source§

impl SearchRepositoriesBuilder

Source

pub fn new() -> Self

Source

pub async fn send(&self, client: &Client) -> Result<Vec<Repository>>

Trait Implementations§

Source§

impl Clone for SearchRepositoriesBuilder

Source§

fn clone(&self) -> SearchRepositoriesBuilder

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for SearchRepositoriesBuilder

Source§

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

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

impl Default for SearchRepositoriesBuilder

Source§

fn default() -> SearchRepositoriesBuilder

Returns the “default value” for a type. Read more
Source§

impl Serialize for SearchRepositoriesBuilder

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

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

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

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 T
where U: From<T>,

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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

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

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.
Source§

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

Source§

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

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.
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
Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> MaybeSendSync for T