Struct async_mpd::MpdClient[][src]

pub struct MpdClient { /* fields omitted */ }
Expand description

Mpd Client

Implementations

Create a new MpdClient

Get stats on the music database

Example

use async_mpd::{MpdClient, Error, Tag, Filter, ToFilterExpr};

#[async_std::main]
async fn main() -> Result<(), Error> {
    // Connect to server
    let mut mpd = MpdClient::new();
    mpd.connect("localhost:6600").await?;

    let mut filter = Filter::new()
        .and(Tag::Artist.equals("The Beatles"))
        .and(Tag::Album.contains("White"));

    let res = mpd.search(&filter).await?;
    println!("{:?}", res);

    Ok(())
}

Execute a Mpd Command. Returns a enum wrapped Response

Execute a Mpd Command, get back the matching Response

Trait Implementations

Returns the “default value” for a type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.