Struct Edit
struct Edit<'t, 'a, 'd> {
text: &'t str,
parent: El<'a, 'd>,
order: &'static [&'static str],
prefix: String,
}Expand description
Insertions under one parent element.
Fields§
§text: &'t str§parent: El<'a, 'd>§order: &'static [&'static str]§prefix: StringImplementations§
§impl<'t, 'a, 'd> Edit<'t, 'a, 'd>
impl<'t, 'a, 'd> Edit<'t, 'a, 'd>
fn new( text: &'t str, parent: El<'a, 'd>, order: &'static [&'static str], ) -> Self
fn push(
&self,
edits: &mut Vec<(usize, String)>,
name: &str,
value: &str,
) -> Result<(), FpmlError>
fn push( &self, edits: &mut Vec<(usize, String)>, name: &str, value: &str, ) -> Result<(), FpmlError>
Inserts <name>value</name> after the last child preceding name.
fn push_money(
&self,
edits: &mut Vec<(usize, String)>,
name: &str,
currency: &str,
amount: f64,
) -> Result<(), FpmlError>
fn push_money( &self, edits: &mut Vec<(usize, String)>, name: &str, currency: &str, amount: f64, ) -> Result<(), FpmlError>
Inserts a Money element: its currency, then its amount.
fn insert( &self, edits: &mut Vec<(usize, String)>, name: &str, element: String, ) -> Result<(), FpmlError>
Auto Trait Implementations§
impl<'t, 'a, 'd> Freeze for Edit<'t, 'a, 'd>
impl<'t, 'a, 'd> RefUnwindSafe for Edit<'t, 'a, 'd>
impl<'t, 'a, 'd> Send for Edit<'t, 'a, 'd>
impl<'t, 'a, 'd> Sync for Edit<'t, 'a, 'd>
impl<'t, 'a, 'd> Unpin for Edit<'t, 'a, 'd>
impl<'t, 'a, 'd> UnsafeUnpin for Edit<'t, 'a, 'd>
impl<'t, 'a, 'd> UnwindSafe for Edit<'t, 'a, 'd>
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