pub struct Writer { /* private fields */ }Expand description
@acp:summary “Writes annotations to files and generates diffs” @acp:lock normal
Implementations§
Source§impl Writer
impl Writer
Sourcepub fn with_preserve_existing(self, preserve: bool) -> Self
pub fn with_preserve_existing(self, preserve: bool) -> Self
@acp:summary “Sets whether to preserve existing documentation”
Sourcepub fn with_provenance(self, config: ProvenanceConfig) -> Self
pub fn with_provenance(self, config: ProvenanceConfig) -> Self
@acp:summary “Sets RFC-0003 provenance configuration”
Sourcepub fn plan_changes(
&self,
file_path: &Path,
suggestions: &[Suggestion],
analysis: &AnalysisResult,
) -> Result<Vec<FileChange>>
pub fn plan_changes( &self, file_path: &Path, suggestions: &[Suggestion], analysis: &AnalysisResult, ) -> Result<Vec<FileChange>>
@acp:summary “Plans changes to apply to a file”
Groups suggestions by target and line, creating FileChange entries that can be used for diff generation or application.
Sourcepub fn generate_diff(
&self,
file_path: &Path,
changes: &[FileChange],
) -> Result<String>
pub fn generate_diff( &self, file_path: &Path, changes: &[FileChange], ) -> Result<String>
@acp:summary “Generates a unified diff for preview”
Sourcepub fn apply_changes(
&self,
file_path: &Path,
changes: &[FileChange],
) -> Result<()>
pub fn apply_changes( &self, file_path: &Path, changes: &[FileChange], ) -> Result<()>
@acp:summary “Applies changes to a file on disk”
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Writer
impl RefUnwindSafe for Writer
impl Send for Writer
impl Sync for Writer
impl Unpin for Writer
impl UnwindSafe for Writer
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