pub enum SectionKind {
ScriptInfo,
Styles,
Events,
Fonts,
Graphics,
Unknown,
}Expand description
Section types for state tracking
Identifies which ASS script section is currently being parsed to enable context-aware processing.
Variants§
ScriptInfo
[Script Info] section with metadata
Styles
[V4+ Styles] or [V4 Styles] section
Events
[Events\] section with dialogue/timing
Fonts
[Fonts\] section with embedded fonts
Graphics
[Graphics\] section with embedded images
Unknown
Unknown or unsupported section
Implementations§
Source§impl SectionKind
impl SectionKind
Sourcepub fn from_header(header: &str) -> Self
pub fn from_header(header: &str) -> Self
Parse section kind from header text
Returns appropriate SectionKind for known section headers,
Unknown for unrecognized sections.
§Example
assert_eq!(SectionKind::from_header("Script Info"), SectionKind::ScriptInfo);
assert_eq!(SectionKind::from_header("V4+ Styles"), SectionKind::Styles);
assert_eq!(SectionKind::from_header("Unknown"), SectionKind::Unknown);Sourcepub const fn expects_format(&self) -> bool
pub const fn expects_format(&self) -> bool
Check if section expects format line
Trait Implementations§
Source§impl Clone for SectionKind
impl Clone for SectionKind
Source§fn clone(&self) -> SectionKind
fn clone(&self) -> SectionKind
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SectionKind
impl Debug for SectionKind
Source§impl PartialEq for SectionKind
impl PartialEq for SectionKind
impl Copy for SectionKind
impl Eq for SectionKind
impl StructuralPartialEq for SectionKind
Auto Trait Implementations§
impl Freeze for SectionKind
impl RefUnwindSafe for SectionKind
impl Send for SectionKind
impl Sync for SectionKind
impl Unpin for SectionKind
impl UnwindSafe for SectionKind
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