pub struct Editor { /* private fields */ }Expand description
A chainable editing session. Each operation is atomic; finish returns the
latest persistent parse.
Implementations§
Source§impl Editor
impl Editor
Sourcepub fn replace_last(
self,
record: usize,
name: &str,
value: &LogicalValue,
) -> Result<Self, EditError>
pub fn replace_last( self, record: usize, name: &str, value: &LogicalValue, ) -> Result<Self, EditError>
Sourcepub fn replace_all(
self,
record: usize,
name: &str,
value: &LogicalValue,
) -> Result<Self, EditError>
pub fn replace_all( self, record: usize, name: &str, value: &LogicalValue, ) -> Result<Self, EditError>
Sourcepub fn insert_after(
self,
record: usize,
after: &str,
name: &FieldName,
value: &LogicalValue,
) -> Result<Self, EditError>
pub fn insert_after( self, record: usize, after: &str, name: &FieldName, value: &LogicalValue, ) -> Result<Self, EditError>
Inserts a field after the last matching field.
§Errors
Returns an error if the record or anchor field does not exist.
Sourcepub fn set_unique(
self,
record: usize,
name: &FieldName,
value: &LogicalValue,
style: &FormatStyle,
) -> Result<Self, EditError>
pub fn set_unique( self, record: usize, name: &FieldName, value: &LogicalValue, style: &FormatStyle, ) -> Result<Self, EditError>
Sets one canonical field and removes earlier matching declarations.
§Errors
Returns an error if the record is absent or an absent field has no valid insertion anchor.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Editor
impl RefUnwindSafe for Editor
impl Send for Editor
impl Sync for Editor
impl Unpin for Editor
impl UnsafeUnpin for Editor
impl UnwindSafe for Editor
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