pub struct CaseConverter { /* private fields */ }Expand description
Main converter for transforming case formats in files
Implementations§
Source§impl CaseConverter
impl CaseConverter
Sourcepub fn new(
from_format: CaseFormat,
to_format: CaseFormat,
file_extensions: Option<Vec<String>>,
recursive: bool,
dry_run: bool,
prefix: String,
suffix: String,
strip_prefix: Option<String>,
strip_suffix: Option<String>,
replace_prefix_from: Option<String>,
replace_prefix_to: Option<String>,
replace_suffix_from: Option<String>,
replace_suffix_to: Option<String>,
glob_pattern: Option<String>,
word_filter: Option<String>,
) -> Result<Self>
pub fn new( from_format: CaseFormat, to_format: CaseFormat, file_extensions: Option<Vec<String>>, recursive: bool, dry_run: bool, prefix: String, suffix: String, strip_prefix: Option<String>, strip_suffix: Option<String>, replace_prefix_from: Option<String>, replace_prefix_to: Option<String>, replace_suffix_from: Option<String>, replace_suffix_to: Option<String>, glob_pattern: Option<String>, word_filter: Option<String>, ) -> Result<Self>
Creates a new case converter
Sourcepub fn process_file(&self, filepath: &Path, base_path: &Path) -> Result<()>
pub fn process_file(&self, filepath: &Path, base_path: &Path) -> Result<()>
Processes a single file
Sourcepub fn process_directory(&self, directory_path: &Path) -> Result<()>
pub fn process_directory(&self, directory_path: &Path) -> Result<()>
Processes a directory or file
Auto Trait Implementations§
impl Freeze for CaseConverter
impl RefUnwindSafe for CaseConverter
impl Send for CaseConverter
impl Sync for CaseConverter
impl Unpin for CaseConverter
impl UnsafeUnpin for CaseConverter
impl UnwindSafe for CaseConverter
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