[−][src]Struct libstrophe::StanzaMutRef
Wrapper for mutable reference to Stanza
, implements Deref
and DerefMut
to Stanza
You can obtain such objects by calling Stanza
child search methods.
Methods from Deref<Target = Stanza>
pub fn as_inner(&self) -> *mut xmpp_stanza_t
[src]
Return internal raw pointer to stanza, for internal use
pub fn is_text(&self) -> bool
[src]
pub fn is_tag(&self) -> bool
[src]
pub fn to_text(&self) -> Result<String>
[src]
pub fn set_name(&mut self, name: impl AsRef<str>) -> EmptyResult
[src]
Be aware that calling this method changes the internal type of stanza to XMPP_STANZA_TAG
.
pub fn name(&self) -> Option<&str>
[src]
pub fn attribute_count(&self) -> i32
[src]
pub fn set_attribute(
&mut self,
name: impl AsRef<str>,
value: impl AsRef<str>
) -> EmptyResult
[src]
&mut self,
name: impl AsRef<str>,
value: impl AsRef<str>
) -> EmptyResult
pub fn get_attribute(&self, name: impl AsRef<str>) -> Option<&str>
[src]
pub fn attributes(&self) -> HashMap<&str, &str>
[src]
This method returns data as HashMap
unlike underlying function.
pub fn del_attribute(&mut self, name: impl AsRef<str>) -> EmptyResult
[src]
pub fn set_text(&mut self, text: impl AsRef<str>) -> EmptyResult
[src]
xmpp_stanza_set_text_with_size
Be aware that calling this method changes the internal type of stanza to XMPP_STANZA_TEXT
.
pub fn text(&self) -> Option<String>
[src]
pub fn set_id(&mut self, id: impl AsRef<str>) -> EmptyResult
[src]
pub fn id(&self) -> Option<&str>
[src]
pub fn set_ns(&mut self, ns: impl AsRef<str>) -> EmptyResult
[src]
pub fn ns(&self) -> Option<&str>
[src]
pub fn set_stanza_type(&mut self, typ: impl AsRef<str>) -> EmptyResult
[src]
pub fn stanza_type(&self) -> Option<&str>
[src]
pub fn set_to(&mut self, to: impl AsRef<str>) -> EmptyResult
[src]
pub fn to(&self) -> Option<&str>
[src]
pub fn set_from(&mut self, from: impl AsRef<str>) -> EmptyResult
[src]
pub fn from(&self) -> Option<&str>
[src]
pub fn get_first_child(&self) -> Option<StanzaRef>
[src]
pub fn get_first_child_mut(&mut self) -> Option<StanzaMutRef>
[src]
pub fn get_child_by_ns(&self, ns: impl AsRef<str>) -> Option<StanzaRef>
[src]
pub fn get_child_by_ns_mut(
&mut self,
ns: impl AsRef<str>
) -> Option<StanzaMutRef>
[src]
&mut self,
ns: impl AsRef<str>
) -> Option<StanzaMutRef>
pub fn get_child_by_name(&self, name: impl AsRef<str>) -> Option<StanzaRef>
[src]
pub fn get_child_by_name_mut(
&mut self,
name: impl AsRef<str>
) -> Option<StanzaMutRef>
[src]
&mut self,
name: impl AsRef<str>
) -> Option<StanzaMutRef>
pub fn children(&self) -> impl Iterator<Item = StanzaRef>
[src]
pub fn children_mut(&mut self) -> impl Iterator<Item = StanzaMutRef>
[src]
pub fn get_next(&self) -> Option<StanzaRef>
[src]
pub fn get_next_mut(&mut self) -> Option<StanzaMutRef>
[src]
pub fn add_child(&mut self, child: Stanza) -> EmptyResult
[src]
pub fn reply(&self) -> Self
[src]
pub fn set_body(&mut self, body: impl AsRef<str>) -> EmptyResult
[src]
pub fn body(&self) -> Option<String>
[src]
Trait Implementations
impl<'st> Into<StanzaMutRef<'st>> for Stanza
[src]
fn into(self) -> StanzaMutRef<'st>
[src]
impl<'_> Deref for StanzaMutRef<'_>
[src]
impl<'_> DerefMut for StanzaMutRef<'_>
[src]
impl<'st> Debug for StanzaMutRef<'st>
[src]
impl<'_> Display for StanzaMutRef<'_>
[src]
Auto Trait Implementations
impl<'st> !Send for StanzaMutRef<'st>
impl<'st> Unpin for StanzaMutRef<'st>
impl<'st> !Sync for StanzaMutRef<'st>
impl<'st> UnwindSafe for StanzaMutRef<'st>
impl<'st> RefUnwindSafe for StanzaMutRef<'st>
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,