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
Source§impl Serialize for EventType
impl Serialize for EventType
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
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 UnsafeUnpin 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more