pub enum EventType {
Dialogue,
Comment,
Picture,
Sound,
Movie,
Command,
}Expand description
Event type discriminant for different kinds of timeline events
Determines how the event is processed during subtitle rendering. Different types have different behaviors during playback.
Variants§
Dialogue
Dialogue line (displayed during playback)
Comment
Comment (ignored during playback)
Picture
Picture display event
Sound
Sound playback event
Movie
Movie playback event
Command
Command execution event
Implementations§
Source§impl EventType
impl EventType
Sourcepub fn parse_type(s: &str) -> Option<EventType>
pub fn parse_type(s: &str) -> Option<EventType>
Parse event type from string
Converts ASS event type names to the corresponding enum variant.
Returns None for unrecognized event types.
§Examples
assert_eq!(EventType::parse_type("Dialogue"), Some(EventType::Dialogue));
assert_eq!(EventType::parse_type("Comment"), Some(EventType::Comment));
assert_eq!(EventType::parse_type("Unknown"), None);Trait Implementations§
impl Copy for EventType
impl Eq for EventType
impl StructuralPartialEq for EventType
Auto Trait Implementations§
impl Freeze for EventType
impl RefUnwindSafe for EventType
impl Send for EventType
impl Sync for EventType
impl Unpin for EventType
impl UnwindSafe for EventType
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