Struct SearchLabelsParams

Source
pub struct SearchLabelsParams<'req> { /* private fields */ }
Expand description

Query parameters for the Search labels endpoint.

Implementations§

Source§

impl<'req> SearchLabelsParams<'req>

Source

pub fn new() -> Self

Source

pub fn repository_id(self, repository_id: i32) -> Self

The id of the repository.

Source

pub fn q(self, q: &'req str) -> Self

The search keywords. This endpoint does not accept qualifiers in the query. To learn more about the format of the query, see Constructing a search query.

Source

pub fn sort(self, sort: &'req str) -> Self

Sorts the results of your query by when the label was created or updated. Default: best match

Source

pub fn order(self, order: &'req str) -> Self

Determines whether the first search result returned is the highest number of matches (desc) or lowest number of matches (asc). This parameter is ignored unless you provide sort.

Source

pub fn per_page(self, per_page: u16) -> Self

The number of results per page (max 100). For more information, see "Using pagination in the REST API."

Source

pub fn page(self, page: u16) -> Self

The page number of the results to fetch. For more information, see "Using pagination in the REST API."

Trait Implementations§

Source§

impl<'req> Default for SearchLabelsParams<'req>

Source§

fn default() -> SearchLabelsParams<'req>

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

impl<'enc> From<&'enc PerPage> for SearchLabelsParams<'enc>

Source§

fn from(per_page: &'enc PerPage) -> Self

Converts to this type from the input type.
Source§

impl<'req> Serialize for SearchLabelsParams<'req>

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§

§

impl<'req> Freeze for SearchLabelsParams<'req>

§

impl<'req> RefUnwindSafe for SearchLabelsParams<'req>

§

impl<'req> Send for SearchLabelsParams<'req>

§

impl<'req> Sync for SearchLabelsParams<'req>

§

impl<'req> Unpin for SearchLabelsParams<'req>

§

impl<'req> UnwindSafe for SearchLabelsParams<'req>

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, 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, 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.