pub struct Stanza { /* private fields */ }Implementations§
Source§impl Stanza
impl Stanza
pub fn new() -> Stanza
pub fn from_pairs(pairs: Vec<(String, StanzaValue)>) -> Stanza
pub fn add(&mut self, tag: String, value: StanzaValue) -> Result<(), Error>
pub fn contains(&self, find_tag: &str) -> bool
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn iter_pairs(&self) -> impl Iterator<Item = (&str, &StanzaValue)>
pub fn to_bytes_lines(&self) -> Vec<Vec<u8>>
pub fn to_lines(&self) -> Vec<String>
pub fn to_string(&self) -> String
pub fn to_bytes(&self) -> Vec<u8> ⓘ
pub fn write<T: Write>(&self, to_file: &mut T) -> Result<()>
pub fn get(&self, tag: &str) -> Option<&StanzaValue>
pub fn get_all(&self, tag: &str) -> Vec<&StanzaValue>
pub fn as_dict(&self) -> HashMap<String, StanzaValue>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Stanza
impl RefUnwindSafe for Stanza
impl Send for Stanza
impl Sync for Stanza
impl Unpin for Stanza
impl UnsafeUnpin for Stanza
impl UnwindSafe for Stanza
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