[−][src]Struct async_mpd::MpdClient
Mpd Client
Implementations
impl MpdClient
[src]
pub async fn new<A: ToSocketAddrs>(addr: A) -> Result<Self, Error>
[src]
Create a new MpdClient and connect to addr
pub async fn reconnect<'_>(&'_ mut self) -> Result<(), Error>
[src]
Reconnect to server
pub async fn stats<'_>(&'_ mut self) -> Result<Stats, Error>
[src]
Get stats on the music database
pub async fn status<'_>(&'_ mut self) -> Result<Status, Error>
[src]
pub async fn update<'_, '_>(
&'_ mut self,
path: Option<&'_ str>
) -> Result<i32, Error>
[src]
&'_ mut self,
path: Option<&'_ str>
) -> Result<i32, Error>
pub async fn rescan<'_, '_>(
&'_ mut self,
path: Option<&'_ str>
) -> Result<i32, Error>
[src]
&'_ mut self,
path: Option<&'_ str>
) -> Result<i32, Error>
pub async fn idle<'_>(&'_ mut self) -> Result<Option<Subsystem>, Error>
[src]
pub async fn noidle<'_>(&'_ mut self) -> Result<(), Error>
[src]
pub async fn setvol<'_>(&'_ mut self, volume: u32) -> Result<(), Error>
[src]
pub async fn repeat<'_>(&'_ mut self, repeat: bool) -> Result<(), Error>
[src]
pub async fn random<'_>(&'_ mut self, random: bool) -> Result<(), Error>
[src]
pub async fn consume<'_>(&'_ mut self, consume: bool) -> Result<(), Error>
[src]
pub async fn play<'_>(&'_ mut self) -> Result<(), Error>
[src]
pub async fn playid<'_>(&'_ mut self, id: u32) -> Result<(), Error>
[src]
pub async fn pause<'_>(&'_ mut self) -> Result<(), Error>
[src]
pub async fn play_pause<'_>(&'_ mut self, play: bool) -> Result<(), Error>
[src]
pub async fn next<'_>(&'_ mut self) -> Result<(), Error>
[src]
pub async fn prev<'_>(&'_ mut self) -> Result<(), Error>
[src]
pub async fn stop<'_>(&'_ mut self) -> Result<(), Error>
[src]
pub async fn listall<'_>(
&'_ mut self,
path: Option<String>
) -> Result<Vec<String>, Error>
[src]
&'_ mut self,
path: Option<String>
) -> Result<Vec<String>, Error>
pub async fn listallinfo<'_, '_>(
&'_ mut self,
path: Option<&'_ str>
) -> Result<Vec<Mixed>, Error>
[src]
&'_ mut self,
path: Option<&'_ str>
) -> Result<Vec<Mixed>, Error>
pub async fn queue_add<'_, '_>(&'_ mut self, path: &'_ str) -> Result<(), Error>
[src]
pub async fn queue_clear<'_>(&'_ mut self) -> Result<(), Error>
[src]
pub async fn queue<'_>(&'_ mut self) -> Result<Vec<Track>, Error>
[src]
pub async fn search<'_, '_>(
&'_ mut self,
filter: &'_ Filter
) -> Result<Vec<Track>, Error>
[src]
&'_ mut self,
filter: &'_ Filter
) -> Result<Vec<Track>, Error>
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("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(()) }
Auto Trait Implementations
impl RefUnwindSafe for MpdClient
impl Send for MpdClient
impl Sync for MpdClient
impl Unpin for MpdClient
impl UnwindSafe for MpdClient
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, 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>,