Expand description
A library for reading SRT Subtitles.
§Examples
§Reading from a string
let items = srtparse::from_str("1\n00:00:01,100 --> 00:00:02,120\nHello!").unwrap();
println!("{:?}", items);
§Reading from a file
let items = srtparse::from_file("./data/underworld.srt").unwrap();
println!("{:?}", items[0]);
Structs§
Enums§
- Item
Factory Error - Could not create subtitle
- Parse
Error - An error when parsing a subtitle
- Parse
Time Error - An error when parsing time
- Reader
Error - An error when reading subtitles
Functions§
- from_
file - Read subtitles from a file
- from_
reader - Read subtitles from a buffered reader
- from_
str - Read subtitles from a string