Event

Enum Event 

Source
pub enum Event<'a> {
Show 16 variants Shutdown, LogMessage { prefix: &'a str, level: &'a str, text: &'a str, log_level: LogLevel, }, GetPropertyReply { name: &'a str, result: PropertyData<'a>, reply_userdata: u64, }, SetPropertyReply(u64), CommandReply(u64), StartFile, EndFile(EndFileReason), FileLoaded, ClientMessage(Vec<&'a str>), VideoReconfig, AudioReconfig, Seek, PlaybackRestart, PropertyChange { name: &'a str, change: PropertyData<'a>, reply_userdata: u64, }, QueueOverflow, Deprecated(mpv_event),
}

Variants§

§

Shutdown

Received when the player is shutting down

§

LogMessage

Has not been tested, received when explicitly asked to MPV

Fields

§prefix: &'a str
§level: &'a str
§text: &'a str
§log_level: LogLevel
§

GetPropertyReply

Received when using get_property_async

Fields

§name: &'a str
§result: PropertyData<'a>
§reply_userdata: u64
§

SetPropertyReply(u64)

Received when using set_property_async

§

CommandReply(u64)

Received when using command_async

§

StartFile

Event received when a new file is playing

§

EndFile(EndFileReason)

Event received when the file being played currently has stopped, for an error or not

§

FileLoaded

Event received when a file has been loaded, but has not been started

§

ClientMessage(Vec<&'a str>)

§

VideoReconfig

§

AudioReconfig

§

Seek

The player changed current position

§

PlaybackRestart

§

PropertyChange

Received when used with observe_property

Fields

§name: &'a str
§change: PropertyData<'a>
§reply_userdata: u64
§

QueueOverflow

Received when the Event Queue is full

§

Deprecated(mpv_event)

A deprecated event

Trait Implementations§

Source§

impl<'a> Debug for Event<'a>

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'a> Freeze for Event<'a>

§

impl<'a> RefUnwindSafe for Event<'a>

§

impl<'a> !Send for Event<'a>

§

impl<'a> !Sync for Event<'a>

§

impl<'a> Unpin for Event<'a>

§

impl<'a> UnwindSafe for Event<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

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

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.
Source§

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

Source§

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

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.