Struct twitch_api::helix::search::search_categories::SearchCategoriesRequest
source · [−]#[non_exhaustive]pub struct SearchCategoriesRequest<'a> {
pub query: Cow<'a, str>,
pub after: Option<Cow<'a, CursorRef>>,
pub before: Option<Cow<'a, CursorRef>>,
pub first: Option<usize>,
}
helix
only.Expand description
Query Parameters for Search Categories
Fields (Non-exhaustive)
This struct is marked as non-exhaustive
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.query: Cow<'a, str>
URI encoded search query
after: Option<Cow<'a, CursorRef>>
Cursor for forward pagination: tells the server where to start fetching the next set of results, in a multi-page response. The cursor value specified here is from the pagination response field of a prior query.
before: Option<Cow<'a, CursorRef>>
Cursor for backward pagination: tells the server where to start fetching the next set of results, in a multi-page response. The cursor value specified here is from the pagination response field of a prior query.
first: Option<usize>
Number of values to be returned per page. Limit: 100. Default: 20.
Implementations
sourceimpl<'a> SearchCategoriesRequest<'a>
impl<'a> SearchCategoriesRequest<'a>
sourcepub fn builder() -> SearchCategoriesRequestBuilder<'a, ((), (), (), ())>
pub fn builder() -> SearchCategoriesRequestBuilder<'a, ((), (), (), ())>
Create a builder for building SearchCategoriesRequest
.
On the builder, call .query(...)
, .after(...)
(optional), .before(...)
(optional), .first(...)
(optional) to set the values of the fields.
Finally, call .build()
to create the instance of SearchCategoriesRequest
.
sourceimpl<'a> SearchCategoriesRequest<'a>
impl<'a> SearchCategoriesRequest<'a>
sourcepub fn query(query: impl Into<Cow<'a, str>>) -> Self
pub fn query(query: impl Into<Cow<'a, str>>) -> Self
Search categories with the following query.
Examples found in repository?
134 135 136 137 138 139 140 141 142 143 144 145 146
pub fn search_categories<T>(
&'a self,
query: impl Into<&'a str>,
token: &'a T,
) -> std::pin::Pin<
Box<dyn futures::Stream<Item = Result<helix::search::Category, ClientError<'a, C>>> + 'a>,
>
where
T: TwitchToken + Send + Sync + ?Sized,
{
let req = helix::search::SearchCategoriesRequest::query(query.into()).first(100);
make_stream(req, token, self, std::collections::VecDeque::from)
}
sourcepub fn first(self, first: usize) -> Self
pub fn first(self, first: usize) -> Self
Set amount of results returned per page.
Examples found in repository?
134 135 136 137 138 139 140 141 142 143 144 145 146
pub fn search_categories<T>(
&'a self,
query: impl Into<&'a str>,
token: &'a T,
) -> std::pin::Pin<
Box<dyn futures::Stream<Item = Result<helix::search::Category, ClientError<'a, C>>> + 'a>,
>
where
T: TwitchToken + Send + Sync + ?Sized,
{
let req = helix::search::SearchCategoriesRequest::query(query.into()).first(100);
make_stream(req, token, self, std::collections::VecDeque::from)
}
Trait Implementations
sourceimpl<'a> Clone for SearchCategoriesRequest<'a>
impl<'a> Clone for SearchCategoriesRequest<'a>
sourcefn clone(&self) -> SearchCategoriesRequest<'a>
fn clone(&self) -> SearchCategoriesRequest<'a>
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresourceimpl<'a> Debug for SearchCategoriesRequest<'a>
impl<'a> Debug for SearchCategoriesRequest<'a>
sourceimpl<'de: 'a, 'a> Deserialize<'de> for SearchCategoriesRequest<'a>
impl<'de: 'a, 'a> Deserialize<'de> for SearchCategoriesRequest<'a>
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
sourceimpl Paginated for SearchCategoriesRequest<'_>
impl Paginated for SearchCategoriesRequest<'_>
sourcefn set_pagination(&mut self, cursor: Option<Cursor>)
fn set_pagination(&mut self, cursor: Option<Cursor>)
sourceimpl<'a> PartialEq<SearchCategoriesRequest<'a>> for SearchCategoriesRequest<'a>
impl<'a> PartialEq<SearchCategoriesRequest<'a>> for SearchCategoriesRequest<'a>
sourcefn eq(&self, other: &SearchCategoriesRequest<'a>) -> bool
fn eq(&self, other: &SearchCategoriesRequest<'a>) -> bool
sourceimpl Request for SearchCategoriesRequest<'_>
impl Request for SearchCategoriesRequest<'_>
type Response = Vec<TwitchCategory, Global>
type Response = Vec<TwitchCategory, Global>
sourceconst PATH: &'static str = "search/categories"
const PATH: &'static str = "search/categories"
channels
for Get Channel Informationsourceconst SCOPE: &'static [Scope] = _
const SCOPE: &'static [Scope] = _
twitch_oauth2
only.sourceconst OPT_SCOPE: &'static [Scope] = _
const OPT_SCOPE: &'static [Scope] = _
twitch_oauth2
only.sourcefn query(&self) -> Result<String, SerializeError>
fn query(&self) -> Result<String, SerializeError>
sourcefn get_uri(&self) -> Result<Uri, InvalidUri>
fn get_uri(&self) -> Result<Uri, InvalidUri>
sourcefn get_bare_uri() -> Result<Uri, InvalidUri>
fn get_bare_uri() -> Result<Uri, InvalidUri>
sourceimpl RequestGet for SearchCategoriesRequest<'_>
impl RequestGet for SearchCategoriesRequest<'_>
sourcefn parse_inner_response(
request: Option<Self>,
uri: &Uri,
response: &str,
status: StatusCode
) -> Result<Response<Self, Self::Response>, HelixRequestGetError>where
Self: Sized,
fn parse_inner_response(
request: Option<Self>,
uri: &Uri,
response: &str,
status: StatusCode
) -> Result<Response<Self, Self::Response>, HelixRequestGetError>where
Self: Sized,
sourcefn create_request(
&self,
token: &str,
client_id: &str
) -> Result<Request<Bytes>, CreateRequestError>
fn create_request(
&self,
token: &str,
client_id: &str
) -> Result<Request<Bytes>, CreateRequestError>
http::Request
from this Request
in your clientsourceimpl<'a> Serialize for SearchCategoriesRequest<'a>
impl<'a> Serialize for SearchCategoriesRequest<'a>
impl<'a> Eq for SearchCategoriesRequest<'a>
impl<'a> StructuralEq for SearchCategoriesRequest<'a>
impl<'a> StructuralPartialEq for SearchCategoriesRequest<'a>
Auto Trait Implementations
impl<'a> RefUnwindSafe for SearchCategoriesRequest<'a>
impl<'a> Send for SearchCategoriesRequest<'a>
impl<'a> Sync for SearchCategoriesRequest<'a>
impl<'a> Unpin for SearchCategoriesRequest<'a>
impl<'a> UnwindSafe for SearchCategoriesRequest<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
sourceimpl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.