Struct libstrophe::StanzaRef
[−]
[src]
pub struct StanzaRef<'cx>(_);
Wrapper for constant 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 name(&self) -> Option<&str>
[src]
pub fn attribute_count(&self) -> i32
[src]
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 text(&self) -> Option<String>
[src]
pub fn id(&self) -> Option<&str>
[src]
pub fn ns(&self) -> Option<&str>
[src]
pub fn stanza_type(&self) -> Option<&str>
[src]
pub fn to(&self) -> Option<&str>
[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_name<RefStr: AsRef<str>>(
&self,
name: RefStr
) -> Option<StanzaRef>
[src]
&self,
name: RefStr
) -> Option<StanzaRef>
pub fn get_next(&self) -> Option<StanzaRef>
[src]
pub fn reply(&self) -> Stanza<'cx>
[src]
pub fn body(&self) -> Option<String>
[src]
Trait Implementations
impl<'cx> Into<StanzaRef<'cx>> for Stanza<'cx>
[src]
impl<'cx> Debug for StanzaRef<'cx>
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more