pub struct Stream { /* private fields */ }Expand description
One stream’s fields. BTreeMap keeps iteration order stable, which the output formatters depend on for deterministic XML/JSON.
Implementations§
Source§impl Stream
impl Stream
pub fn new() -> Self
pub fn set(&mut self, parameter: &str, value: Ztring, replace: bool)
Sourcepub fn set_extra(&mut self, parameter: &str, value: Ztring, replace: bool)
pub fn set_extra(&mut self, parameter: &str, value: Ztring, replace: bool)
Append (or, if replace, overwrite) an <extra>-bucket entry.
Extras don’t appear in iter() — formatters call extras_iter()
separately so they end up in their own XML/JSON block.
pub fn get(&self, parameter: &str) -> Option<&Ztring>
pub fn contains(&self, parameter: &str) -> bool
pub fn count(&self) -> usize
Sourcepub fn iter(&self) -> impl Iterator<Item = (&str, &Ztring)>
pub fn iter(&self) -> impl Iterator<Item = (&str, &Ztring)>
Iterate fields in insertion order — matches the C++ behavior of emitting in the order parsers filled.
Sourcepub fn extras_iter(&self) -> impl Iterator<Item = (&str, &Ztring)>
pub fn extras_iter(&self) -> impl Iterator<Item = (&str, &Ztring)>
Iterate <extra>-bucket fields in insertion order.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Stream
impl RefUnwindSafe for Stream
impl Send for Stream
impl Sync for Stream
impl Unpin for Stream
impl UnsafeUnpin for Stream
impl UnwindSafe for Stream
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