pub struct ReplacementSet {
pub config: ReplacementConfig,
pub plans: Vec<FileReplacementPlan>,
/* private fields */
}Expand description
Represents the complete set of replacements across all files
Fields§
§config: ReplacementConfigThe configuration for this replacement operation
plans: Vec<FileReplacementPlan>Plans for each file that needs modification
Implementations§
Source§impl ReplacementSet
impl ReplacementSet
Sourcepub fn new(config: ReplacementConfig) -> Self
pub fn new(config: ReplacementConfig) -> Self
Creates a new replacement set with the given configuration
Sourcepub fn add_plan(&mut self, plan: FileReplacementPlan)
pub fn add_plan(&mut self, plan: FileReplacementPlan)
Adds a file replacement plan to this set
Sourcepub fn list_undo_operations(
config: &ReplacementConfig,
) -> SearchResult<Vec<(UndoInfo, PathBuf)>>
pub fn list_undo_operations( config: &ReplacementConfig, ) -> SearchResult<Vec<(UndoInfo, PathBuf)>>
Lists available undo operations with detailed information
Sourcepub fn undo_by_id(id: u64, config: &ReplacementConfig) -> SearchResult<()>
pub fn undo_by_id(id: u64, config: &ReplacementConfig) -> SearchResult<()>
Undoes a specific replacement operation by ID with progress reporting
Sourcepub fn metrics(&self) -> &MemoryMetrics
pub fn metrics(&self) -> &MemoryMetrics
Gets a reference to the metrics
Sourcepub fn apply_with_progress(&self) -> SearchResult<Vec<PathBuf>>
pub fn apply_with_progress(&self) -> SearchResult<Vec<PathBuf>>
Applies all replacements in parallel with progress reporting
Sourcepub fn apply(&self) -> SearchResult<()>
pub fn apply(&self) -> SearchResult<()>
Applies all replacements in parallel without progress reporting
Sourcepub fn preview(&self) -> SearchResult<Vec<PreviewResult>>
pub fn preview(&self) -> SearchResult<Vec<PreviewResult>>
Generates a preview of the changes in parallel
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ReplacementSet
impl RefUnwindSafe for ReplacementSet
impl Send for ReplacementSet
impl Sync for ReplacementSet
impl Unpin for ReplacementSet
impl UnwindSafe for ReplacementSet
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more