Struct musicbrainz_rs::SearchQuery[][src]

pub struct SearchQuery<T>(_);
Expand description

Search requests provide a way to search for MusicBrainz entities based on different sorts of queries.

Search

The MusicBrainz API search requests provide a way to search for MusicBrainz entities based on different sorts of queries.

Example

let query = Artist::query_builder()
        .name("Miles Davis")
        .and()
        .country("US")
        .build();

    let query_result = Artist::search(query).execute()?;
    let query_result: Vec<String> = query_result
        .entities
        .iter()
        .map(|artist| artist.name.clone())
        .collect();

    assert!(query_result.contains(&"Miles Davis".to_string()));
    assert!(query_result.contains(&"Miles Davis Quintet".to_string()));

Implementations

impl SearchQuery<Area>[src]

pub fn with_artists_relations(&mut self) -> &mut Self[src]

pub fn with_tags(&mut self) -> &mut Self[src]

pub fn with_aliases(&mut self) -> &mut Self[src]

pub fn with_genres(&mut self) -> &mut Self[src]

pub fn with_annotations(&mut self) -> &mut Self[src]

impl SearchQuery<Artist>[src]

pub fn with_recordings(&mut self) -> &mut Self[src]

pub fn with_releases(&mut self) -> &mut Self[src]

pub fn with_releases_and_discids(&mut self) -> &mut Self[src]

pub fn with_release_groups(&mut self) -> &mut Self[src]

pub fn with_aliases(&mut self) -> &mut Self[src]

pub fn with_works(&mut self) -> &mut Self[src]

pub fn with_artist_relations(&mut self) -> &mut Self[src]

pub fn with_event_relations(&mut self) -> &mut Self[src]

pub fn with_tags(&mut self) -> &mut Self[src]

pub fn with_rating(&mut self) -> &mut Self[src]

pub fn with_genres(&mut self) -> &mut Self[src]

pub fn with_annotations(&mut self) -> &mut Self[src]

impl SearchQuery<Event>[src]

pub fn with_artist_relations(&mut self) -> &mut Self[src]

pub fn with_tags(&mut self) -> &mut Self[src]

pub fn with_aliases(&mut self) -> &mut Self[src]

pub fn with_ratings(&mut self) -> &mut Self[src]

pub fn with_genres(&mut self) -> &mut Self[src]

pub fn with_annotations(&mut self) -> &mut Self[src]

impl SearchQuery<Instrument>[src]

pub fn with_artist_relations(&mut self) -> &mut Self[src]

pub fn with_tags(&mut self) -> &mut Self[src]

pub fn with_aliases(&mut self) -> &mut Self[src]

pub fn with_genres(&mut self) -> &mut Self[src]

pub fn with_annotations(&mut self) -> &mut Self[src]

impl SearchQuery<Label>[src]

pub fn with_releases(&mut self) -> &mut Self[src]

pub fn with_tags(&mut self) -> &mut Self[src]

pub fn with_aliases(&mut self) -> &mut Self[src]

pub fn with_ratings(&mut self) -> &mut Self[src]

pub fn with_genres(&mut self) -> &mut Self[src]

pub fn with_annotations(&mut self) -> &mut Self[src]

impl SearchQuery<Place>[src]

pub fn with_artist_relations(&mut self) -> &mut Self[src]

pub fn with_tags(&mut self) -> &mut Self[src]

pub fn with_aliases(&mut self) -> &mut Self[src]

pub fn with_genres(&mut self) -> &mut Self[src]

pub fn with_annotations(&mut self) -> &mut Self[src]

impl SearchQuery<Recording>[src]

pub fn with_artists(&mut self) -> &mut Self[src]

pub fn with_releases(&mut self) -> &mut Self[src]

pub fn with_tags(&mut self) -> &mut Self[src]

pub fn with_aliases(&mut self) -> &mut Self[src]

pub fn with_genres(&mut self) -> &mut Self[src]

pub fn with_ratings(&mut self) -> &mut Self[src]

pub fn with_annotations(&mut self) -> &mut Self[src]

impl SearchQuery<Release>[src]

pub fn with_labels(&mut self) -> &mut Self[src]

pub fn with_recordings(&mut self) -> &mut Self[src]

pub fn with_release_groups(&mut self) -> &mut Self[src]

pub fn with_tags(&mut self) -> &mut Self[src]

pub fn with_ratings(&mut self) -> &mut Self[src]

pub fn with_aliases(&mut self) -> &mut Self[src]

pub fn with_genres(&mut self) -> &mut Self[src]

pub fn with_annotations(&mut self) -> &mut Self[src]

impl SearchQuery<ReleaseGroup>[src]

pub fn with_artists(&mut self) -> &mut Self[src]

pub fn with_releases(&mut self) -> &mut Self[src]

pub fn with_tags(&mut self) -> &mut Self[src]

pub fn with_aliases(&mut self) -> &mut Self[src]

pub fn with_genres(&mut self) -> &mut Self[src]

pub fn with_ratings(&mut self) -> &mut Self[src]

pub fn with_annotations(&mut self) -> &mut Self[src]

impl SearchQuery<Series>[src]

pub fn with_artist_relations(&mut self) -> &mut Self[src]

pub fn with_tags(&mut self) -> &mut Self[src]

pub fn with_aliases(&mut self) -> &mut Self[src]

pub fn with_genres(&mut self) -> &mut Self[src]

pub fn with_annotations(&mut self) -> &mut Self[src]

impl SearchQuery<Url>[src]

pub fn with_artist_relations(&mut self) -> &mut Self[src]

impl SearchQuery<Work>[src]

pub fn with_artist_relations(&mut self) -> &mut Self[src]

pub fn with_tags(&mut self) -> &mut Self[src]

pub fn with_ratings(&mut self) -> &mut Self[src]

pub fn with_aliases(&mut self) -> &mut Self[src]

pub fn with_genres(&mut self) -> &mut Self[src]

pub fn with_annotations(&mut self) -> &mut Self[src]

impl<'a, T> SearchQuery<T> where
    T: Search<'a> + Clone
[src]

pub fn execute(&mut self) -> Result<SearchResult<T>, Error> where
    T: Search<'a> + DeserializeOwned + Searchable
[src]

Trait Implementations

impl<T: Clone> Clone for SearchQuery<T>[src]

fn clone(&self) -> SearchQuery<T>[src]

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl<T: Debug> Debug for SearchQuery<T>[src]

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

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl<T> RefUnwindSafe for SearchQuery<T> where
    T: RefUnwindSafe

impl<T> Send for SearchQuery<T> where
    T: Send

impl<T> Sync for SearchQuery<T> where
    T: Sync

impl<T> Unpin for SearchQuery<T> where
    T: Unpin

impl<T> UnwindSafe for SearchQuery<T> where
    T: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

pub fn to_owned(&self) -> T[src]

Creates owned data from borrowed data, usually by cloning. Read more

pub fn clone_into(&self, target: &mut T)[src]

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

type Err = <U as TryFrom<T>>::Err

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Err>