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
GetPropertyReply
Received when using get_property_async
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
ChapterChange
QueueOverflow
Received when the Event Queue is full
Unused
Unused event
Trait Implementations§
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> 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