pub struct ConcatConfig {
pub base_extensions: Vec<String>,
pub extensions_to_concat: Vec<String>,
pub output_extension: String,
pub remove_duplicates: bool,
pub tag_separator: String,
pub deduplicate_files: bool,
}
Expand description
Configuration for file concatenation
This configuration controls how files are concatenated, with the following behavior:
- Base extensions define which files to look for (e.g., jpg, png)
- Extensions to concatenate define which related files to process (e.g., caption, wd, tags)
- Caption files (with extension “caption” or “florence”) are treated specially:
- Their content is appended after the concatenated tags
- They aren’t included in tag deduplication
Fields§
§base_extensions: Vec<String>
§extensions_to_concat: Vec<String>
§output_extension: String
§remove_duplicates: bool
§tag_separator: String
§deduplicate_files: bool
Implementations§
Source§impl ConcatConfig
impl ConcatConfig
pub fn new( base_extensions: Vec<String>, extensions_to_concat: Vec<String>, output_extension: String, remove_duplicates: bool, tag_separator: String, ) -> Self
pub fn with_deduplication(self, deduplicate: bool) -> Self
pub fn from_preset(preset: FileExtensionPreset) -> Self
Trait Implementations§
Source§impl Clone for ConcatConfig
impl Clone for ConcatConfig
Source§fn clone(&self) -> ConcatConfig
fn clone(&self) -> ConcatConfig
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 ConcatConfig
impl Debug for ConcatConfig
Source§impl<'de> Deserialize<'de> for ConcatConfig
impl<'de> Deserialize<'de> for ConcatConfig
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 ConcatConfig
impl PartialEq for ConcatConfig
Source§impl Serialize for ConcatConfig
impl Serialize for ConcatConfig
impl Eq for ConcatConfig
impl StructuralPartialEq for ConcatConfig
Auto Trait Implementations§
impl Freeze for ConcatConfig
impl RefUnwindSafe for ConcatConfig
impl Send for ConcatConfig
impl Sync for ConcatConfig
impl Unpin for ConcatConfig
impl UnwindSafe for ConcatConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.