pub struct Element {
pub value: Value,
/* private fields */
}Expand description
A packed element.
Fields§
§value: ValueProper value of a element.
Implementations§
Source§impl Element
impl Element
pub fn new() -> Self
pub fn iter_children_all(&self) -> impl Iterator<Item = &(String, Value)>
pub fn add_children<S: Into<String>>(&mut self, key: S, value: Value)
pub fn iter_children<'a, 'b: 'a>( &'a self, key: &'b str, ) -> impl Iterator<Item = &'a Value> + 'a
pub fn iter_children_mut<'a, 'b: 'a>( &'a mut self, key: &'b str, ) -> impl Iterator<Item = &'a mut Value> + 'a
pub fn get_child<'a, 'b>(&'a self, key: &'b str) -> Option<&'a Value>
pub fn get_child_mut<'a, 'b>( &'a mut self, key: &'b str, ) -> Option<&'a mut Value>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Element
impl RefUnwindSafe for Element
impl Send for Element
impl Sync for Element
impl Unpin for Element
impl UnwindSafe for Element
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