pub struct StanzaRef<'st>(/* private fields */);Expand description
Methods from Deref<Target = Stanza>§
Sourcepub fn to_text(&self) -> Result<String, ToTextError>
pub fn to_text(&self) -> Result<String, ToTextError>
Sourcepub fn attribute_count(&self) -> i32
pub fn attribute_count(&self) -> i32
Sourcepub fn attributes(&self) -> HashMap<&str, &str>
pub fn attributes(&self) -> HashMap<&str, &str>
This method returns data as HashMap unlike underlying function.
Sourcepub fn stanza_type(&self) -> Option<&str>
pub fn stanza_type(&self) -> Option<&str>
Sourcepub fn get_first_child(&self) -> Option<StanzaRef<'_>>
pub fn get_first_child(&self) -> Option<StanzaRef<'_>>
Sourcepub fn get_child_by_name_and_ns(
&self,
name: impl AsRef<str>,
ns: impl AsRef<str>,
) -> Option<StanzaRef<'_>>
pub fn get_child_by_name_and_ns( &self, name: impl AsRef<str>, ns: impl AsRef<str>, ) -> Option<StanzaRef<'_>>
Sourcepub fn get_child_by_path(&self, path: &[&str]) -> Option<StanzaRef<'_>>
pub fn get_child_by_path(&self, path: &[&str]) -> Option<StanzaRef<'_>>
Due to internal limitations (vararg call in C) this function supports a maximum of 10 elements
in the path slice.
pub fn children(&self) -> impl Iterator<Item = StanzaRef<'_>>
Sourcepub fn reply_error(
&self,
error_type: impl AsRef<str>,
condition: impl AsRef<str>,
text: impl AsRef<str>,
) -> Self
pub fn reply_error( &self, error_type: impl AsRef<str>, condition: impl AsRef<str>, text: impl AsRef<str>, ) -> Self
Trait Implementations§
impl<'st> Eq for StanzaRef<'st>
Auto Trait Implementations§
impl<'st> Freeze for StanzaRef<'st>
impl<'st> RefUnwindSafe for StanzaRef<'st>
impl<'st> !Send for StanzaRef<'st>
impl<'st> !Sync for StanzaRef<'st>
impl<'st> Unpin for StanzaRef<'st>
impl<'st> UnwindSafe for StanzaRef<'st>
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