Enum Event

Source
pub enum Event<'a> {
Show 24 variants Shutdown, LogMessage { prefix: &'static str, level: &'static str, text: &'static str, log_level: LogLevel, }, GetPropertyReply { name: &'static str, result: Result<Format<'a>>, reply_userdata: u32, }, SetPropertyReply(Result<()>, u32), CommandReply(Result<()>, u32), StartFile, EndFile(Result<EndFileReason>), FileLoaded, TracksChanged, TrackSwitched, Idle, Pause, Unpause, Tick, ClientMessage, VideoReconfig, AudioReconfig, MetadataUpdate, Seek, PlaybackRestart, PropertyChange { name: &'static str, change: Format<'a>, reply_userdata: u32, }, ChapterChange, QueueOverflow, Unused,
}

Variants§

§

Shutdown

Received when the player is shutting down

§

LogMessage

Has not been tested, received when explicitly asked to MPV

Fields

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

GetPropertyReply

Received when using get_property_async

Fields

§name: &'static str
§result: Result<Format<'a>>
§reply_userdata: u32
§

SetPropertyReply(Result<()>, u32)

Received when using set_property_async

§

CommandReply(Result<()>, u32)

Received when using command_async

§

StartFile

Event received when a new file is playing

§

EndFile(Result<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

§

TracksChanged

§

TrackSwitched

Deprecated

§

Idle

Received when the player has no more files to play and is in an idle state

§

Pause

The player paused playback

§

Unpause

The player started playback again

§

Tick

§

ClientMessage

Unimplemented

§

VideoReconfig

§

AudioReconfig

§

MetadataUpdate

§

Seek

The player changed current position

§

PlaybackRestart

§

PropertyChange

Received when used with observe_property

Fields

§name: &'static str
§change: Format<'a>
§reply_userdata: u32
§

ChapterChange

§

QueueOverflow

Received when the Event Queue is full

§

Unused

Unused 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.