pub struct TagListQueryBuilder<'a> {
    pub id: Option<NonZeroU64>,
    pub limit: Option<u16>,
    pub pid: Option<u64>,
    pub name: Option<&'a str>,
    pub name_pattern: Option<&'a str>,
    pub order: Option<&'a str>,
    /* private fields */
}
Expand description

A query builder to get tags

Fields§

§id: Option<NonZeroU64>

The id

§limit: Option<u16>

The max number of tags to return.

This looks like it is capped at 1000, requests for more only return 1000. This behavior is undocumented however. As such, requesting more than 1000 does not trigger an error.

§pid: Option<u64>

The page id

This returns the page of the given number, starting at 0. This option is undocumented.

§name: Option<&'a str>

The tag name to look up

This is a single tag name. This option is undocumented. This option will attempt to circumvent rule34 bugs where possible by translating the tags into a form the api can understand.

§name_pattern: Option<&'a str>

The name pattern to look up using a SQL LIKE clause.

% = multi char wildcard _ = single char wildcard This option is undocumented.

§order: Option<&'a str>

The field to order results by.

name: Order by tag name count: Order by tag count

Implementations§

source§

impl<'a> TagListQueryBuilder<'a>

source

pub fn new(client: &'a Client) -> Self

Make a new [TagsListQueryBuilder]

source

pub fn id(&mut self, id: Option<NonZeroU64>) -> &mut Self

Set the tag id

source

pub fn limit(&mut self, limit: Option<u16>) -> &mut Self

Set the limit.

This looks like it is capped at 1000, requests for more only return 1000. This behavior is undocumented however. As such, requesting more than 1000 does not trigger an error.

source

pub fn pid(&mut self, pid: Option<u64>) -> &mut Self

Set the page id

This returns the page of the given number, starting at 0. This option is undocumented.

source

pub fn name(&'a mut self, name: Option<&'a str>) -> &'a mut Self

The tag name to look up

This is a single tag name. This option is undocumented. This option will attempt to circumvent rule34 bugs where possible by translating the tags into a form the api can understand.

source

pub fn name_pattern(&'a mut self, name_pattern: Option<&'a str>) -> &'a mut Self

The name pattern to look up using a SQL LIKE clause.

% = multi char wildcard _ = single char wildcard This option is undocumented.

source

pub fn order(&'a mut self, order: Option<&'a str>) -> &'a mut Self

The field to order results by.

name: Order by tag name count: Order by tag count This option is undocumented.

source

pub fn get_url(&self) -> Result<Url, Error>

Get the url for this query.

source

pub async fn execute(&self) -> Result<TagList, Error>

Execute the query

Trait Implementations§

source§

impl<'a> Debug for TagListQueryBuilder<'a>

source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

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,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere 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.

§

impl<T> Instrument for T

§

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

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

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

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 Twhere U: Into<T>,

§

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 Twhere U: TryFrom<T>,

§

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

impl<T> WithSubscriber for T

§

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
§

fn with_current_subscriber(self) -> WithDispatch<Self>

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