[−][src]Struct mtgapi_client::api::set::filter::SetFilterBuilder
Builder for filtered set requests
Methods
impl SetFilterBuilder
[src]
pub fn build(self) -> SetFilter
[src]
Creates a Setilter with the specified filter parameters
let builder = SetFilter::builder(); let filter = builder .name("Khans of Tarkir") .block(SetBlock::KhansOfTarkir) .build(); assert!(filter == SetFilter("name=Khans of Tarkir&block=Khans of Tarkir".to_string()))
pub fn custom<'a, T>(self, key: T, value: T) -> SetFilterBuilder where
T: Into<&'a str>,
[src]
T: Into<&'a str>,
Create a custom filter
let builder = SetFilter::builder(); let filter = builder.custom("name", "Dominaria") .build(); assert!(filter == SetFilter("name=Dominaria".to_string()))
pub fn name<'a, T>(self, name: T) -> SetFilterBuilder where
T: Into<&'a str>,
[src]
T: Into<&'a str>,
Every set that (partially) matches the specified name will match the filter
let builder = SetFilter::builder(); let filter = builder.name("Dominaria") .build(); assert!(filter == SetFilter("name=Dominaria".to_string()))
pub fn names<T>(self, names: &[T]) -> SetFilterBuilder where
T: Display,
[src]
T: Display,
Every set that (partially) matches one of the specified names will match the filter
let builder = SetFilter::builder(); let filter = builder.names(&vec!["Dominaria", "Core Set 2019"]) .build(); assert!(filter == SetFilter("name=Dominaria|Core Set 2019".to_string()));
pub fn block(self, block: SetBlock) -> SetFilterBuilder
[src]
Every set that (partially) matches the specified block will match the filter
let builder = SetFilter::builder(); let filter = builder.block(SetBlock::Amonkhet) .build(); assert!(filter == SetFilter("block=Amonkhet".to_string()))
pub fn blocks(self, blocks: &[SetBlock]) -> SetFilterBuilder
[src]
Every set that (partially) matches one of the specified blocks will match the filter
let builder = SetFilter::builder(); let filter = builder.blocks(&vec![SetBlock::Amonkhet, SetBlock::Ixalan]) .build(); assert!(filter == SetFilter("block=Amonkhet|Ixalan".to_string()));
Trait Implementations
impl Clone for SetFilterBuilder
[src]
fn clone(&self) -> SetFilterBuilder
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for SetFilterBuilder
[src]
Auto Trait Implementations
impl RefUnwindSafe for SetFilterBuilder
impl Send for SetFilterBuilder
impl Sync for SetFilterBuilder
impl Unpin for SetFilterBuilder
impl UnwindSafe for SetFilterBuilder
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,