pub struct Ion { /* private fields */ }
Implementations§
source§impl Ion
impl Ion
pub fn new(sections: BTreeMap<String, Section>) -> Ion
pub fn from_str_filtered( s: &str, accepted_sections: Vec<&str> ) -> Result<Self, IonError>
pub fn get(&self, key: &str) -> Option<&Section>
sourcepub fn get_mut(&mut self, key: &str) -> Option<&mut Section>
pub fn get_mut(&mut self, key: &str) -> Option<&mut Section>
Returns a mutable reference to the section associated with the given key.
If a section exists for the provided key, a mutable reference to that section is returned.
If no section is associated with the key, None
is returned.
pub fn fetch(&self, key: &str) -> Result<&Section, IonError>
pub fn remove(&mut self, key: &str) -> Option<Section>
pub fn iter(&self) -> impl Iterator<Item = (&String, &Section)>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Ion
impl RefUnwindSafe for Ion
impl Send for Ion
impl Sync for Ion
impl Unpin for Ion
impl UnwindSafe for Ion
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