pub struct GameBrainSearchParams {
pub filters: Vec<GameBrainFilter>,
pub sort: Option<GameBrainSort>,
pub sort_order: Option<GameBrainSortOrder>,
pub limit: Option<u32>,
pub offset: Option<u32>,
}Expand description
Todos os campos são opcionais — use apenas o que precisar.
§Exemplo
let params = GameBrainSearchParams {
filters: vec![
GameBrainFilter {
key: "platform".into(),
values: vec![GameBrainFilterValue { value: "pc".into() }],
connection: Some("OR".into()),
},
],
sort: Some(GameBrainSort::Rating),
sort_order: Some(GameBrainSortOrder::Desc),
limit: Some(20),
offset: None,
};Fields§
§filters: Vec<GameBrainFilter>Filtros a aplicar na busca. Os valores válidos vêm do campo filter_options da resposta da API.
sort: Option<GameBrainSort>§sort_order: Option<GameBrainSortOrder>Direção da ordenação. Padrão da API: descendente.
limit: Option<u32>Número máximo de resultados. Padrão da API: 10.
offset: Option<u32>Trait Implementations§
Source§impl Clone for GameBrainSearchParams
impl Clone for GameBrainSearchParams
Source§fn clone(&self) -> GameBrainSearchParams
fn clone(&self) -> GameBrainSearchParams
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for GameBrainSearchParams
impl Debug for GameBrainSearchParams
Source§impl Default for GameBrainSearchParams
impl Default for GameBrainSearchParams
Source§fn default() -> GameBrainSearchParams
fn default() -> GameBrainSearchParams
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for GameBrainSearchParams
impl RefUnwindSafe for GameBrainSearchParams
impl Send for GameBrainSearchParams
impl Sync for GameBrainSearchParams
impl Unpin for GameBrainSearchParams
impl UnsafeUnpin for GameBrainSearchParams
impl UnwindSafe for GameBrainSearchParams
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> NoneValue for Twhere
T: Default,
impl<T> NoneValue for Twhere
T: Default,
type NoneType = T
§fn null_value() -> T
fn null_value() -> T
The none-equivalent value.