Struct libstrophe::StanzaMutRef
[−]
[src]
pub struct StanzaMutRef<'cx>(_);
Wrapper for mutable ref to Stanza
, implements Deref
to Stanza
You can obtain such objects by calling Stanza
child search methods.
Methods from Deref<Target = Stanza<'cx>>
pub fn as_inner(&self) -> *const xmpp_stanza_t
[src]
Return internal raw pointer to stanza, for internal use
pub fn context(&self) -> ContextRef<'cx>
[src]
Return context for this Stanza
The underlying library does not provide direct access to its context so this method works this around by relying on some of the library internals. With the new version this might need rewriting.
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<RefStr: AsRef<str>>(&mut self, name: RefStr) -> 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<RefStr1: AsRef<str>, RefStr2: AsRef<str>>(
&mut self,
name: RefStr1,
value: RefStr2
) -> EmptyResult
[src]
&mut self,
name: RefStr1,
value: RefStr2
) -> EmptyResult
pub fn get_attribute<RefStr: AsRef<str>>(&self, name: RefStr) -> Option<&str>
[src]
pub fn attributes(&self) -> HashMap<&str, &str>
[src]
This method returns data as HashMap
unlike underlying function.
pub fn del_attribute<RefStr: AsRef<str>>(&mut self, name: RefStr) -> EmptyResult
[src]
pub fn set_text<RefStr: AsRef<str>>(&mut self, text: RefStr) -> 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<RefStr: AsRef<str>>(&mut self, id: RefStr) -> EmptyResult
[src]
pub fn id(&self) -> Option<&str>
[src]
pub fn set_ns<RefStr: AsRef<str>>(&mut self, ns: RefStr) -> EmptyResult
[src]
pub fn ns(&self) -> Option<&str>
[src]
pub fn set_stanza_type<RefStr: AsRef<str>>(
&mut self,
typ: RefStr
) -> EmptyResult
[src]
&mut self,
typ: RefStr
) -> EmptyResult
pub fn stanza_type(&self) -> Option<&str>
[src]
pub fn set_to<RefStr: AsRef<str>>(&mut self, to: RefStr) -> EmptyResult
[src]
pub fn to(&self) -> Option<&str>
[src]
pub fn set_from<RefStr: AsRef<str>>(&mut self, from: RefStr) -> EmptyResult
[src]
pub fn from(&self) -> Option<&str>
[src]
pub fn get_first_child(&self) -> Option<StanzaRef>
[src]
pub fn get_first_child_mut(&self) -> Option<StanzaMutRef>
[src]
pub fn get_child_by_ns<RefStr: AsRef<str>>(
&self,
ns: RefStr
) -> Option<StanzaRef>
[src]
&self,
ns: RefStr
) -> Option<StanzaRef>
pub fn get_child_by_ns_mut<RefStr: AsRef<str>>(
&mut self,
ns: RefStr
) -> Option<StanzaMutRef>
[src]
&mut self,
ns: RefStr
) -> Option<StanzaMutRef>
pub fn get_child_by_name<RefStr: AsRef<str>>(
&self,
name: RefStr
) -> Option<StanzaRef>
[src]
&self,
name: RefStr
) -> Option<StanzaRef>
pub fn get_child_by_name_mut<RefStr: AsRef<str>>(
&mut self,
name: RefStr
) -> Option<StanzaMutRef>
[src]
&mut self,
name: RefStr
) -> Option<StanzaMutRef>
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) -> Stanza<'cx>
[src]
pub fn set_body<RefStr: AsRef<str>>(&mut self, body: RefStr) -> EmptyResult
[src]
pub fn body(&self) -> Option<String>
[src]
Trait Implementations
impl<'cx> Into<StanzaMutRef<'cx>> for Stanza<'cx>
[src]
fn into(self) -> StanzaMutRef<'cx>
[src]
Performs the conversion.
impl<'cx> Debug for StanzaMutRef<'cx>
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl<'cx> Deref for StanzaMutRef<'cx>
[src]
type Target = Stanza<'cx>
The resulting type after dereferencing.
fn deref(&self) -> &Self::Target
[src]
Dereferences the value.