pub struct SearchOptions { /* private fields */ }
Expand description
Advanced searching options for Scryfall, including unique de-duplication strategy, sort order, page number, and any extras to include. For documentation on each option, refer to this struct’s methods.
For more information, refer to the official docs.
Implementations§
Source§impl SearchOptions
impl SearchOptions
Sourcepub fn with_query(query: Query) -> Self
pub fn with_query(query: Query) -> Self
Constructs a new SearchOptions
with default values and the specified
query.
Sourcepub fn page(&mut self, page: usize) -> &mut Self
pub fn page(&mut self, page: usize) -> &mut Self
Sets the page number to start with. Page 0 is equivalent to page 1.
Sourcepub fn unique(&mut self, unique: UniqueStrategy) -> &mut Self
pub fn unique(&mut self, unique: UniqueStrategy) -> &mut Self
Sets the strategy for omitting similar cards.
Sourcepub fn sort(&mut self, order: SortOrder, dir: SortDirection) -> &mut Self
pub fn sort(&mut self, order: SortOrder, dir: SortDirection) -> &mut Self
Sets the sort order and direction for returned cards.
Sourcepub fn direction(&mut self, dir: SortDirection) -> &mut Self
pub fn direction(&mut self, dir: SortDirection) -> &mut Self
Sets the sort direction for returned cards.
Sourcepub fn extras(&mut self, include_extras: bool) -> &mut Self
pub fn extras(&mut self, include_extras: bool) -> &mut Self
If true, extra cards (tokens, planes, etc) will be included.
Sourcepub fn multilingual(&mut self, include_multilingual: bool) -> &mut Self
pub fn multilingual(&mut self, include_multilingual: bool) -> &mut Self
If true, cards in every language supported by Scryfall will be included.
Sourcepub fn variations(&mut self, include_variations: bool) -> &mut Self
pub fn variations(&mut self, include_variations: bool) -> &mut Self
If true, rare care variants will be included, like the Hairy Runesword.
Trait Implementations§
Source§impl Debug for SearchOptions
impl Debug for SearchOptions
Source§impl Default for SearchOptions
impl Default for SearchOptions
Source§fn default() -> SearchOptions
fn default() -> SearchOptions
Returns the “default value” for a type. Read more
Source§impl Search for SearchOptions
impl Search for SearchOptions
Source§fn write_query(&self, url: &mut Url) -> Result<()>
fn write_query(&self, url: &mut Url) -> Result<()>
Write this search as the query for the given
Url
.Source§fn search<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<ListIter<Card>>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
fn search<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<ListIter<Card>>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
Convenience method for passing this object to
Card::search
.Auto Trait Implementations§
impl Freeze for SearchOptions
impl RefUnwindSafe for SearchOptions
impl Send for SearchOptions
impl Sync for SearchOptions
impl Unpin for SearchOptions
impl UnwindSafe for SearchOptions
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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