pub struct MpvInstance { /* private fields */ }Implementations§
source§impl MpvInstance
impl MpvInstance
pub async fn new( mpv_bin: &PathBuf, ipc_path: Option<&PathBuf>, config_dir: Option<&PathBuf>, ) -> Result<Self>
pub async fn valid(&self) -> bool
pub async fn send_command(&mut self, cmd: Value) -> Result<Value>
pub async fn get_prop<T: DeserializeOwned>(&mut self, name: &str) -> Result<T>
pub async fn set_prop( &mut self, name: &str, value: impl Serialize, ) -> Result<()>
pub async fn watch_event<A, F, Fut>(&mut self, name: String, callback: F)
pub async fn observe_prop<T: 'static + Send + Sync + Clone + DeserializeOwned>( &mut self, name: &str, default: T, ) -> Receiver<T>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for MpvInstance
impl !RefUnwindSafe for MpvInstance
impl Send for MpvInstance
impl Sync for MpvInstance
impl Unpin for MpvInstance
impl !UnwindSafe for MpvInstance
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