pub struct FormatsConfig {
pub default_output: String,
pub preserve_styling: bool,
pub default_encoding: String,
pub encoding_detection_confidence: f32,
}
Expand description
Subtitle format related configuration.
Controls how subtitle files are processed, including format conversion, encoding detection, and style preservation.
§Examples
use subx_cli::config::FormatsConfig;
let formats = FormatsConfig::default();
assert_eq!(formats.default_output, "srt");
assert_eq!(formats.default_encoding, "utf-8");
assert!(!formats.preserve_styling);
Fields§
§default_output: String
Default output format (e.g. “srt”, “ass”, “vtt”).
preserve_styling: bool
Whether to preserve style information during format conversion.
default_encoding: String
Default character encoding (e.g. “utf-8”, “gbk”).
encoding_detection_confidence: f32
Encoding detection confidence threshold (0.0-1.0).
Trait Implementations§
Source§impl Clone for FormatsConfig
impl Clone for FormatsConfig
Source§fn clone(&self) -> FormatsConfig
fn clone(&self) -> FormatsConfig
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 FormatsConfig
impl Debug for FormatsConfig
Source§impl Default for FormatsConfig
impl Default for FormatsConfig
Source§impl<'de> Deserialize<'de> for FormatsConfig
impl<'de> Deserialize<'de> for FormatsConfig
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
Auto Trait Implementations§
impl Freeze for FormatsConfig
impl RefUnwindSafe for FormatsConfig
impl Send for FormatsConfig
impl Sync for FormatsConfig
impl Unpin for FormatsConfig
impl UnwindSafe for FormatsConfig
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