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_core::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: StringDefault output format (e.g. “srt”, “ass”, “vtt”).
preserve_styling: boolWhether to preserve style information during format conversion.
default_encoding: StringDefault character encoding (e.g. “utf-8”, “gbk”).
encoding_detection_confidence: f32Encoding 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 (const: unstable) · 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§fn default() -> FormatsConfig
fn default() -> FormatsConfig
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for FormatsConfig
impl<'de> Deserialize<'de> for FormatsConfig
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<FormatsConfig, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<FormatsConfig, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for FormatsConfig
impl Serialize for FormatsConfig
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
Auto Trait Implementations§
impl Freeze for FormatsConfig
impl RefUnwindSafe for FormatsConfig
impl Send for FormatsConfig
impl Sync for FormatsConfig
impl Unpin for FormatsConfig
impl UnsafeUnpin 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