pub struct ValidatedEdit { /* private fields */ }Expand description
Validated edit - wraps Edit with automatic parse validation.
Ensures that:
- The edit doesn’t introduce new parse errors
- Generated code snippets are valid according to syn
Implementations§
Source§impl ValidatedEdit
impl ValidatedEdit
Sourcepub fn skip_parse_validation(self) -> Self
pub fn skip_parse_validation(self) -> Self
Disable parse validation (useful when intentionally editing broken code).
Sourcepub fn apply(self) -> Result<EditResult, ValidationError>
pub fn apply(self) -> Result<EditResult, ValidationError>
Apply the edit with validation.
Returns an error if the edit would introduce parse errors.
Auto Trait Implementations§
impl Freeze for ValidatedEdit
impl RefUnwindSafe for ValidatedEdit
impl Send for ValidatedEdit
impl Sync for ValidatedEdit
impl Unpin for ValidatedEdit
impl UnsafeUnpin for ValidatedEdit
impl UnwindSafe for ValidatedEdit
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