pub struct RecordViewMut<'a> { /* private fields */ }Expand description
Mutable view: same getters plus field editing.
Implementations§
Source§impl<'a> RecordViewMut<'a>
impl<'a> RecordViewMut<'a>
pub fn record_name(&self) -> &str
pub fn field(&self, name: &str) -> Option<&Node>
pub fn symbol_field(&self, name: &str) -> Option<&str>
pub fn string_field(&self, name: &str) -> Option<String>
Sourcepub fn field_mut(&mut self, name: &str) -> Option<&mut Node>
pub fn field_mut(&mut self, name: &str) -> Option<&mut Node>
Mutable value node of the first (name value) child, for
in-place edits inside field expressions.
Sourcepub fn set_field(&mut self, name: &str, value: Node)
pub fn set_field(&mut self, name: &str, value: Node)
Replace the value of (name value) in place, or append a new
(name value) child when the field is absent.
Sourcepub fn remove_field(&mut self, name: &str) -> bool
pub fn remove_field(&mut self, name: &str) -> bool
Remove the (name value) child, taking attached leading trivia.
Auto Trait Implementations§
impl<'a> !UnwindSafe for RecordViewMut<'a>
impl<'a> Freeze for RecordViewMut<'a>
impl<'a> RefUnwindSafe for RecordViewMut<'a>
impl<'a> Send for RecordViewMut<'a>
impl<'a> Sync for RecordViewMut<'a>
impl<'a> Unpin for RecordViewMut<'a>
impl<'a> UnsafeUnpin for RecordViewMut<'a>
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