pub struct MpvLink { /* private fields */ }Implementations§
Source§impl MpvLink
impl MpvLink
Sourcepub fn spawn_client() -> Result<Self, MpvLinkInitError>
pub fn spawn_client() -> Result<Self, MpvLinkInitError>
Spawns a new child process and uses the input-ipc-client option to pass it a socket.
Sourcepub fn spawn_server(path: &Path) -> Result<Self, MpvLinkInitError>
pub fn spawn_server(path: &Path) -> Result<Self, MpvLinkInitError>
Spawns a new child process and uses the input-ipc-server option to pass it a path where to create a socket.
Sourcepub fn connect(path: &Path) -> Result<Self, MpvLinkInitError>
pub fn connect(path: &Path) -> Result<Self, MpvLinkInitError>
Connects to an existing process spawned with input-ipc-server option by opening the socket.
pub fn set_nonblocking(&mut self, nonblocking: bool) -> Result<(), Error>
Sourcepub fn wait_read(&self, timeout: Option<Duration>) -> Result<(), Error>
pub fn wait_read(&self, timeout: Option<Duration>) -> Result<(), Error>
Blocks until reading becomes available on self.stream().
If timeout is not None then returns Err(TimedOut) on timeout.
Sourcepub fn deinit(&mut self) -> Result<(), MpvLinkDeinitError>
pub fn deinit(&mut self) -> Result<(), MpvLinkDeinitError>
Deinitializes self.
If self has been deinitialized returns Ok(()).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for MpvLink
impl RefUnwindSafe for MpvLink
impl Send for MpvLink
impl Sync for MpvLink
impl Unpin for MpvLink
impl UnwindSafe for MpvLink
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