pub struct Document {
pub leading_comments: Vec<String>,
pub items: Vec<DocumentData>,
}Fields§
§leading_comments: Vec<String>§items: Vec<DocumentData>Implementations§
Trait Implementations§
impl StructuralPartialEq for Document
Source§impl YamlInsert for Document
impl YamlInsert for Document
fn edit_hash_structure<F>(&mut self, path: &YamlPath, f: &F) -> usize
fn for_hash<F, R, A: Additive>(&mut self, path: &YamlPath, f: &F, r: &R) -> A
Source§fn insert_into_hash(
&mut self,
path: &YamlPath,
h: &AliasedYaml,
overwrite: bool,
) -> usize
fn insert_into_hash( &mut self, path: &YamlPath, h: &AliasedYaml, overwrite: bool, ) -> usize
Insert AliasedYaml into a hash
Returns the amount of insertions.
Can be more than 1 when using indexes or all array elements etc
fn insert_into_hash_by_call<F>(
&mut self,
path: &YamlPath,
h: F,
overwrite: bool,
) -> usizewhere
F: Fn() -> AliasedYaml,
fn remove_from_hash(&mut self, path: &YamlPath) -> usize
fn rename_field(&mut self, path: &YamlPath, new_name: String) -> usize
fn to_object(&mut self, path: &YamlPath, object_key: String) -> usize
fn move_to_subfield( &mut self, path: &YamlPath, subfield: String, fields_to_move: Vec<String>, ) -> usize
fn move_to_map_with_field_as_key( &mut self, path: &YamlPath, old_map_name: String, selector: String, new_map_name: String, keeps: Vec<String>, ) -> usize
Auto Trait Implementations§
impl Freeze for Document
impl RefUnwindSafe for Document
impl Send for Document
impl Sync for Document
impl Unpin for Document
impl UnsafeUnpin for Document
impl UnwindSafe for Document
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