Struct Query

Source
pub struct Query { /* private fields */ }

Implementations§

Source§

impl Query

Source

pub fn new() -> Self

Source

pub fn from_repo(repo: Repo) -> Self

Source

pub fn author(self, username: &str) -> Self

Adds an author to the query.

Result is author:username.

Source

pub fn repo(self, user: &str, repo: &str) -> Self

Adds a repo to the query.

Results in repo:user/repo.

Source

pub fn repos(self, n: &str) -> Self

Search for User by count of repositories.

Results in repos:n. n does not have to be a standard int. >5 and 10..15 are also valid values.

Source

pub fn is(self, statement: &str) -> Self

Adds an is statement to the query.

Results in is:statement.

Source

pub fn in(self, keyword: &str, field: &str) -> Self

Adds an in statement to the query

Results in keyword in:field.

Source

pub fn assignee(self, username: &str) -> Self

Adds an assignee statement to the query.

Results in assignee:username.

Source

pub fn user(self, statement: &str) -> Self

Adds an user statement to the query.

Results in user:statement.

Source

pub fn org(self, statement: &str) -> Self

Adds an org statement to the query.

Results in org:statement.

Source

pub fn fullname(self, first_name: &str, last_name: &str) -> Self

Adds a fullname statement to the query.

Results in fullname:first_name last_name.

Source

pub fn label(self, statement: &str) -> Self

Adds a label statement to the query.

Results in label:statement.

Source

pub fn type(self, statement: &str) -> Self

Adds a type statement to the query.

Results in type:statement.

Use r#type to escape type keyword.

Source

pub fn no(self, statement: &str) -> Self

Adds a no statement to the query.

Results in no:statement.

Source

pub fn language(self, statement: &str) -> Self

Adds a language statement to the query.

Results in language:statement.

Trait Implementations§

Source§

impl Default for Query

Source§

fn default() -> Query

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

impl Display for Query

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl Freeze for Query

§

impl RefUnwindSafe for Query

§

impl Send for Query

§

impl Sync for Query

§

impl Unpin for Query

§

impl UnwindSafe for Query

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> 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> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. 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,