[][src]Struct libstrophe::StanzaMutRef

pub struct StanzaMutRef<'st>(_, _);

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]

xmpp_stanza_set_name

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]

pub fn get_attribute(&self, name: impl AsRef<str>) -> Option<&str>[src]

pub fn attributes(&self) -> HashMap<&str, &str>[src]

xmpp_stanza_get_attributes

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]

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]

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]

impl<'_> Deref for StanzaMutRef<'_>[src]

type Target = Stanza

The resulting type after dereferencing.

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]

impl<T> From<T> for T[src]

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]