Struct libstrophe::StanzaMutRef
source · pub struct StanzaMutRef<'st>(_, _);
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 set_name(&mut self, name: impl AsRef<str>) -> Result<()>
pub fn set_name(&mut self, name: impl AsRef<str>) -> Result<()>
Be aware that calling this method changes the internal type of stanza to XMPP_STANZA_TAG
.
sourcepub fn attribute_count(&self) -> i32
pub fn attribute_count(&self) -> i32
sourcepub fn set_attribute(
&mut self,
name: impl AsRef<str>,
value: impl AsRef<str>
) -> Result<()>
pub fn set_attribute( &mut self, name: impl AsRef<str>, value: impl AsRef<str> ) -> Result<()>
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 set_text(&mut self, text: impl AsRef<str>) -> Result<()>
pub fn set_text(&mut self, text: impl AsRef<str>) -> Result<()>
xmpp_stanza_set_text_with_size
Be aware that calling this method changes the internal type of stanza to XMPP_STANZA_TEXT
.
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_first_child_mut(&mut self) -> Option<StanzaMutRef<'_>>
pub fn get_first_child_mut(&mut self) -> Option<StanzaMutRef<'_>>
sourcepub fn get_child_by_ns_mut(
&mut self,
ns: impl AsRef<str>
) -> Option<StanzaMutRef<'_>>
pub fn get_child_by_ns_mut( &mut self, ns: impl AsRef<str> ) -> Option<StanzaMutRef<'_>>
sourcepub fn get_child_by_name_mut(
&mut self,
name: impl AsRef<str>
) -> Option<StanzaMutRef<'_>>
pub fn get_child_by_name_mut( &mut self, name: impl AsRef<str> ) -> Option<StanzaMutRef<'_>>
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_name_and_ns_mut(
&mut self,
name: impl AsRef<str>,
ns: impl AsRef<str>
) -> Option<StanzaMutRef<'_>>
pub fn get_child_by_name_and_ns_mut( &mut self, name: impl AsRef<str>, ns: impl AsRef<str> ) -> Option<StanzaMutRef<'_>>
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.
sourcepub fn get_child_by_path_mut(
&mut self,
path: &[&str]
) -> Option<StanzaMutRef<'_>>
pub fn get_child_by_path_mut( &mut self, path: &[&str] ) -> Option<StanzaMutRef<'_>>
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<'_>>
pub fn children_mut(&mut self) -> impl Iterator<Item = StanzaMutRef<'_>>
sourcepub fn get_next_mut(&mut self) -> Option<StanzaMutRef<'_>>
pub fn get_next_mut(&mut self) -> Option<StanzaMutRef<'_>>
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§
source§impl<'st> Debug for StanzaMutRef<'st>
impl<'st> Debug for StanzaMutRef<'st>
source§impl Deref for StanzaMutRef<'_>
impl Deref for StanzaMutRef<'_>
source§impl DerefMut for StanzaMutRef<'_>
impl DerefMut for StanzaMutRef<'_>
source§impl Display for StanzaMutRef<'_>
impl Display for StanzaMutRef<'_>
Auto Trait Implementations§
impl<'st> RefUnwindSafe for StanzaMutRef<'st>
impl<'st> Send for StanzaMutRef<'st>
impl<'st> !Sync for StanzaMutRef<'st>
impl<'st> Unpin for StanzaMutRef<'st>
impl<'st> !UnwindSafe for StanzaMutRef<'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