pub struct CaptionConfig {
pub max_chars_per_line: usize,
pub max_lines: usize,
pub max_chars_per_second: f64,
pub min_cue_ms: u64,
pub max_cue_ms: u64,
pub max_gap_ms: u64,
}Expand description
Per-profile segmentation limits.
Fields§
§max_chars_per_line: usize§max_lines: usize§max_chars_per_second: f64Reading-speed ceiling: characters per second of cue time.
min_cue_ms: u64Cues shorter than this are merged with a neighbour when possible, else
held on screen up to ALIGNMENT_TOLERANCE_MS into the following gap.
max_cue_ms: u64A cue never spans longer than this (it splits instead).
max_gap_ms: u64A gap between words larger than this always starts a new cue.
Implementations§
Source§impl CaptionConfig
impl CaptionConfig
pub fn for_profile(profile: Profile) -> Self
Trait Implementations§
Source§impl Clone for CaptionConfig
impl Clone for CaptionConfig
impl Copy for CaptionConfig
Source§impl Debug for CaptionConfig
impl Debug for CaptionConfig
Source§impl Default for CaptionConfig
impl Default for CaptionConfig
Source§impl<'de> Deserialize<'de> for CaptionConfig
impl<'de> Deserialize<'de> for CaptionConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for CaptionConfig
impl PartialEq for CaptionConfig
Source§impl Serialize for CaptionConfig
impl Serialize for CaptionConfig
impl StructuralPartialEq for CaptionConfig
Auto Trait Implementations§
impl Freeze for CaptionConfig
impl RefUnwindSafe for CaptionConfig
impl Send for CaptionConfig
impl Sync for CaptionConfig
impl Unpin for CaptionConfig
impl UnsafeUnpin for CaptionConfig
impl UnwindSafe for CaptionConfig
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